In this article
Compile-time specialization and autotuning selection are separate mechanisms; record which values change each before interpreting cache reuse.
Identify which value changes the program
A Triton kernel receives runtime arguments while also using compile-time choices such as tile dimensions. The vector-add tutorial marks a block size with tl.constexpr. That choice lets compilation reason about a particular program configuration. It is different from passing an ordinary data value that the generated kernel reads at execution, even when both values appear as parameters in the same Python function signature.
Inspect specialization controls precisely
The JIT reference documents specialization-related controls, including do_not_specialize and alignment specialization. Its current notes also distinguish explicit constexpr values from fields excluded through structured-argument specialization controls. Do not treat a cache-control option as permission to erase every compile-time choice. Check which values still define the generated program and whether a requested dynamic value is actually supported by the kernel implementation and compiler path.
Keep autotuning keys separate
The autotune API uses a key to decide when candidate configurations should be reconsidered. That selection mechanism is not the same thing as compiling a program specialization. A workload can reuse a tuning decision while still needing another compiled variant, or revisit tuning under a changed key. Describe both mechanisms when investigating latency rather than labeling every first-use delay as a single undifferentiated cache miss.
Choose a manageable input contract
A serving wrapper should identify the shapes, dtypes, layouts and meta-parameters it permits, then observe the resulting set of variants. Avoid making a highly variable value compile-time merely because a small example used a constant. Conversely, do not convert a structural constant to runtime input without checking the operations that depend on it. Either change can affect compilation, optimization and supported behavior, not only the number of entries stored on disk.
Measure cold and reused paths honestly
Record whether the timing includes compilation, tuning or only execution of an already prepared variant. Exercise representative shape changes and inspect actual reuse before claiming a stable warm path. The guides to compilation versus graph replay and benchmark methodology provide context. Triton’s particular boundary is parameter meaning: runtime values, explicit compile-time constants, specialization controls and tuning keys have related but distinct roles in the identity of a kernel invocation.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.