A warmup run executes a kernel before timing begins. For steady-state measurements, discard the first call and usually several early calls so that one-time work does not distort the result. section 2.2.10
A first Triton call can include CPU compilation as well as GPU execution. Triton caches the compiled binary, so subsequent calls with the same specialization can skip compilation. Changing a constexpr value such as BLOCK_SIZE triggers a fresh compile; changing the runtime vector length does not directly do so. section 2.2.10
Warm up each tuning case
When comparing launch configurations, warm up before timing a new shape: the first launch for a new autotuning key includes the work of measuring candidate configurations. Later launches with the same key use the selected configuration. section 5.8.3
triton.testing.do_bench(
fn,
warmup=25,
rep=100,
grad_to_none=None,
quantiles=None,
return_mode='mean',
)
The Triton benchmarking helper exposes a warmup parameter alongside its measurement settings. section 2.2.10
