dew.cache
Where Dew keeps what it caches on disk, and JAX’s persistent compilation cache.
Kept apart from the telemetry and the loaders that read it, so the interop, config and inference modules take their cache paths without importing the FLOP accounting.
| Name | Summary |
|---|---|
enable_compilation_cache | Persist compiled executables so restarts skip XLA compilation, and the GPU autotuner’s picks beside them. |
enable_compilation_cache
Section titled “enable_compilation_cache”def enable_compilation_cache(path: str)Persist compiled executables so restarts skip XLA compilation, and the GPU autotuner’s picks beside them.
The dominant cost of a restart-heavy TPU workflow, where every run otherwise recompiles the same step function from scratch.
XLA’s GPU compile measures each fusion’s candidate kernels on the device.
The picks go to <path>/autotune/jaxlib-<version>, one file a fusion keyed
by the fusion and the GPU model, for this XLA alone, so a later compile of
the same fusions takes them without measuring. A process beside other work
on its GPU would measure unfairly, so it reads them and adds none
(gpu-run -n 0.5 sets XLA’s AUTOTUNE_CACHE_MODE_READ). Neither the
directory nor the mode is in JAX’s cache key, so a run and a process
that compiled its programs ahead of it share executables. XLA reads its
flags at the first compile; a directory the run names is kept, and a
process whose first compile named one keeps its picks there.
A directory named after the process first compiled holds the programs compiled after: JAX’s cache is settled again at the next compile.
A run under --xla_gpu_deterministic_ops keeps no picks (keeps_picks):
jax 0.11.2’s XLA measures nothing there and gives each instruction the
first configuration that compiles, but would still take a stored pick
over that one, so such a run names an empty directory.