Without jax.jit, JAX dispatches each operation to the device one at a time, as Python reaches it. With jax.jit, JAX traces your function into a jaxpr, lowers it to StableHLO, and hands the whole program to the XLA compiler, which fuses operations and compiles them for the target device. On CPUs and NVIDIA GPUs XLA generates code through LLVM (PTX for NVIDIA), uses Triton for some GPU kernels and NVIDIA libraries such as cuBLAS for others. Either way, JAX runs the result on the device through the PJRT runtime.
Showing jax.jit on an NVIDIA GPU: 12 stages, 13 steps.
Your program
Runtime
Framework core
Kernel
Compiler
Intermediate representation
Hardware
The selected path, step by step
Your JAX code calls JAX: Your functions call JAX's array operations.
JAX traces to jaxpr: jax.jit runs the function once with tracers and records it as a jaxpr, specialized to the argument shapes and dtypes.
jaxpr lowers to StableHLO: The jaxpr is lowered to StableHLO, the XLA compiler's input language.
StableHLO compiled by XLA compiler: XLA compiles the whole StableHLO program, fusing operations and specializing it for the device.
XLA compiler emits LLVM IR: XLA's CPU and GPU backends emit LLVM IR for the computation.
XLA compiler emits, for some kernels Triton IR: XLA:GPU generates some kernels through Triton IR emitters.
XLA compiler calls, for common ops cuBLAS and cuDNN: For each operation XLA chooses between generating code and calling a library; many common operations go to cuBLAS or cuDNN.
LLVM IR lowers to PTX: On NVIDIA GPUs, LLVM's NVPTX backend turns the IR into PTX.
Triton IR lowers to PTX: Triton-emitted kernels also end up as PTX.
PTX built into Compiled executable: The generated kernels become part of the compiled executable.
cuBLAS and cuDNN called from Compiled executable: Library calls are linked into the runtime and invoked by the executable.
Compiled executable run through PJRT runtime: JAX runs the compiled executable on the device through the PJRT runtime API.
PJRT runtime launches on NVIDIA GPU: PJRT's GPU implementation launches the work on the NVIDIA GPU.
Where Python ends
Without jit, Python stays in charge of every operation: each jnp call is dispatched to the device on its own, so the compiler never sees more than one operation at a time.
With jax.jit, Python runs once to trace the function. From then on the computation is a jaxpr, then a StableHLO program, then an executable that XLA built for the device, and later calls with the same shapes reuse the compiled executable without running the Python body again.
How this differs from PyTorch
Both JAX and PyTorch's torch.compile capture a whole computation and compile it, and both can end up in Triton and LLVM on NVIDIA GPUs. JAX hands its program to XLA through a stable intermediate language, StableHLO, and runs it through PJRT; torch.compile captures an FX graph and generates kernels with TorchInductor. See what happens when you run a PyTorch model.
Every stage
Your JAX code
programming language
Python functions using jax.numpy and other JAX APIs.
It traces the function to a jaxpr (How transformations work: tracing) and hands the whole jaxpr to XLA, which compiles it into a single optimized executable, fusing operations, eliminating temporary arrays, and specializing for your CPU, GPU, or TPU.
These backends emit the LLVM IR necessary to represent the HLO computation in an efficient manner, and then invoke LLVM to emit native code from this LLVM IR.
Documented paths for one JAX program run without jit and with jax.jit, on a CPU, an NVIDIA GPU, or a TPU. Multi-device sharding, Pallas kernels, AMD GPUs, PJRT plugins for other hardware, and the internals of XLA's TPU backend are out of scope. XLA's TPU backend is not described in the open-source documentation cited here, so this page shows that XLA compiles for TPUs without showing how.
How this page is checked
Every stage and step above quotes the source that supports it. The quotes were checked against the JAX documentation (About, Just-in-time compilation, Ahead-of-time lowering) and the OpenXLA documentation (XLA architecture, XLA:GPU architecture, PJRT) on 2026-11-11. The data is a versioned JSON file under the same CC BY 4.0 license as the dataset. Found something wrong or out of date? Open an issue with the better source.