Expand description
Lets one process fill a cold kernel cache while the others wait.
CubeCL compiles a kernel the first time it is dispatched, and writes
the result to the cache install_compilation_cache points it at.
The table of contents that cache reads is a snapshot taken when the
GPU client is built, so a process that starts while a second process
is still compiling sees an empty table and shares nothing with it.
Every process in that group pays the full compilation cost and
appends its own copy of the same kernels.
WarmUp closes that window with a lock file next to the cache.
The first process in holds it while it compiles, the rest block, and
by the time they build their own client the cache has everything they
need. Once a run finishes it leaves a stamp file behind, and later
processes see the stamp and skip the lock entirely, so the cost is
paid once rather than on every chunk.
Structs§
- WarmUp
- A held place in the queue to fill a cold cache.
Functions§
- kernel_
key - Identifies the set of kernels a denoiser compiles.