multimesh.jax.enable_fast_path

multimesh.jax.enable_fast_path#

multimesh.jax.enable_fast_path(enable=None, context_value=[True])#

(en|dis)ables native Jax fallthrough path for jitted functions.

For smaller utility functions, the MultiMesh overhead can be very high. The runtime can detect situations where bypassing MultiMesh is allowed and benefiical and falls through to a native CPU/GPU fast path. This can be disabled/re-enabled for debugging or performance tests.

Parameters:
  • enable (bool | None) – optional, whether to enable fast path fallthrough

  • context_value – optional, a global variable holding the current context value. The user should never pass this value. The program begins in a context with enable True, which means that the fast path fallthrough is enabled.