twpasolver.cmes.warmup module#

Pre-compile and disk-cache the package’s Numba CME solver kernels.

Numba’s @njit(cache=True) writes a cache entry only once a function has been called with a given signature, so the first call in a fresh environment pays the full compile time (minutes, for the kernels in twpasolver.cmes). Run twpasolver-warmup once after installing (locally, in a Dockerfile, in CI) to pay that cost up front; pip/Poetry have no post-install hook to do it automatically.

twpasolver.cmes.warmup.warmup(verbose: bool = True) → None[source]#

Trigger and disk-cache compilation of the CME solver kernels.

Each gain model has a single kernel (a uniform device is one segment). Safe to run repeatedly: once the cache is populated, later runs finish in seconds.

twpasolver.cmes.warmup.main() → None[source]#

Entry point for the twpasolver-warmup console script.