Skip to main content

Module dry_run

Module dry_run 

Source
Expand description

Running a workload for the compilation and tuning it provokes, without running the workload itself. Running a workload for the compilation and tuning it provokes, without running the workload itself.

Under a [DryRun] every launch is still expanded, compiled, validated and cached, and is then dropped instead of reaching the device. A warm-up pass then pays for compilation and tuning without also paying for the work that provoked them, which is what makes producing a shippable environment affordable.

The launches autotune issues are the exception: they are the measurement, so [RealRun] opts them back into executing.

Buffers are left as they were, so anything read back during a dry run is meaningless. It only suits a pass driven by the shapes it produces, which is what keys the caches, and never one that branches on a computed value.

The decision is made here, once, on the thread that issues the launch. Servers receive the verdict as a [LaunchMode] argument rather than deriving it: by the time a launch reaches a server thread, the context that produced it is gone.

Structs§

DryRun
Makes every launch a dry run for as long as it lives, on every thread and every device.
RealRun
Makes the launches issued on this thread execute for real even inside a DryRun, for as long as it lives.

Enums§

LaunchMode
What a server should do with a launch.

Functions§

dry_run
Whether launches are currently compiled and dropped rather than run.
launch_mode
What to do with a launch issued on this thread, right now.