Skip to content

Commit

Permalink
enable jit compilation caching (still testing)
Browse files Browse the repository at this point in the history
  • Loading branch information
sludtke42 committed Feb 7, 2025
1 parent 2122286 commit 66639c0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions programs/e3make3d_gauss.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@
# used for profiling. This can be commented out as long as the @profile line is also commented out
#from line_profiler import profile

try: os.mkdir(".jaxcache")
except: pass

# We cache the JIT compilation results to speed up future runs
jax.config.update("jax_compilation_cache_dir", "./.jaxcache")
jax.config.update("jax_persistent_cache_min_entry_size_bytes", -1)
jax.config.update("jax_persistent_cache_min_compile_time_secs", 2)
jax.config.update("jax_persistent_cache_enable_xla_caches", "xla_gpu_per_fusion_autotune_cache_dir")

jax.config.update("jax_default_matmul_precision", "float32")

# @profile
Expand Down

0 comments on commit 66639c0

Please sign in to comment.