TECHNOLOGY

IREE dispatch statistics: profiling can rerun a stateful program outside the measured interval

In this article
THE QUICK TAKE

Diagnostic profiling can execute additional invocations outside the reported interval; stateful programs must account for those executions independently of timing.

The state advances farther than the timing row suggests

A benchmarked function updates state on each invocation. Enabling dispatch statistics changes the final state even though the reported measured iteration schedule looks comparable. The diagnostic mode may execute the program again to collect a dispatch profile outside the measured interval. That is additional computation with real consequences, not passive observation of a previously recorded result. Before comparing outcomes, identify every invocation performed by the benchmark harness as well as the interval used to calculate its timing.

Dispatch attribution uses a separate profiling pass

The IREE benchmarking guide documents dispatch statistics, profiling reruns and their relationship to measured repetitions. It also describes different execution schedules for synchronous, asynchronous and generated dispatch entry points. Read the applicable entry-point contract before interpreting a batch count. A counter named iteration can describe logical work rather than a simple count of identical host function calls. The reported latency and the total number of state transitions therefore need not be interchangeable quantities.

Benchmark harness semantics matter

The Google Benchmark user guide describes repetition and measurement mechanisms used by the underlying harness. IREE adds its own module-specific schedule and profiling behavior. Preserve the exact tool options and generated entry point when comparing results. The latency diagnosis guide provides useful background on measurement boundaries, while a timing row should still be interpreted according to this particular tool rather than a generic end-to-end service definition.

Artificial dispatch repetition has another set of limits

The HAL passes reference warns about repeating dispatches for profiling and its unreliable relationship to whole-program timing. Distinguish that compiler transformation from a legitimate repeated application request and from the separate statistics profile pass. Replaying dependent or stateful work can change cache behavior and semantics. A dispatch microbenchmark may answer a narrow implementation question without establishing the throughput or correctness of the original complete program under normal invocation.

Verify the outcome as well as the clock

For a stateful function, document initialization, reset policy and the expected effect of diagnostic invocations. Use outputs from the appropriate measured path and check whether enabling profiling changes the experiment’s state assumptions. The artifact verification guide ties conclusions to the compiled module and tool revision. Report latency scope and invocation accounting separately. This makes a detailed profile informative without disguising the fact that collecting it can run additional work outside the interval displayed in the headline result.

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.

Explore GPU hosting
← All articles