StableHLO
Also known as StableHLO, HLO, MHLO
In plain English
StableHLO is a standardized intermediate representation that frameworks like PyTorch and JAX emit so the XLA compiler can turn it into TPU machine code.
Technical definition
StableHLO is a portable, versioned operation set built on MLIR that describes a machine learning program at the level of high-level tensor operations, serving as the handoff format between frameworks and the XLA compiler.
Engineering details
In the TorchTPU compiled path, TorchDynamo and AOTAutograd capture an FX graph, TorchTPU lowers it to StableHLO, and XLA compiles that into a TPU executable. In the JAX path, jax.jit traces the program to the same representation. Because StableHLO is stable across versions, a serialized program can be compiled later or by a different framework release. It sits above hardware and below the framework, so it carries no knowledge of MXU tile sizes; XLA adds padding and layout decisions afterward.
Why it matters
A shared IR is what lets vLLM and SGLang reuse one compiler stack whether the model arrived through PyTorch or JAX. It also means Pallas kernels, which bypass StableHLO for hand-tuned operations, must be called explicitly as custom calls rather than discovered by the compiler.
How to read it in InferenceX
All Qwen3.5 397B results in the TPU InferenceX preview flow through StableHLO to XLA. The article contrasts this with the GPU PyTorch path where torch.compile lowers to Inductor and Triton instead.