inference/research
verifiedhigh · 0.85updated 2026-10-04

XLA

compiler-framework

Fields

id
compilers/xla
Repo
openxla/xla
Language
C++
License
Apache-2.0
First release
2017
Category
compiler-framework
Target backends
cudacpu-avx2tpu
Input languages
jaxpytorchtensorflow
Output artifacts
llvm-irptx
Compilation strategy
aot
Autotuning
no
Production ready
yes
Production evidence
TensorFlow uses XLA as its default compiler for GPU and TPUJAX uses XLA for all GPU and TPU executionPyTorch has experimental XLA support via torch_xla
Strengths
Mature: nearly a decade of development, used in production by Google for TensorFlow and JAXTPU support: XLA is the only compiler that targets TPUs at scaleOperator fusion: automatically fuses elementwise and reduction operationsLayout optimization: optimizes data layout for target hardwarePart of OpenXLA: open governance, community contributions
Weaknesses
Limited to Google's hardware ecosystem: TPU support is excellent, but NVIDIA GPU support lags behind Triton/CUTLASSNo autotuning: relies on heuristics rather than search-based optimizationCompilation time: AOT compilation can be slow for large modelsLess control than Triton: users cannot easily write custom fused kernelsNot designed for inference-specific optimizations: XLA was designed for training, and inference-specific optimizations (e.g., KV cache management, continuous batching) are not part of XLA
Learning curve
high
Compile time (s)
120
notes
XLA (Accelerated Linear Algebra) is Google's ML compiler, originally developed for TensorFlow and now part of the OpenXLA project. It is the only production compiler that targets TPUs, making it essential for TPU-based inference. For NVIDIA GPUs, XLA is less commonly used directly; instead, JAX and PyTorch models are often compiled with Triton or hand-written CUDA kernels. XLA's strength is its integration with the TensorFlow/JAX ecosystem and its mature optimization pipeline. However, for LLM inference on NVIDIA GPUs, XLA is not the primary compilation path. The lack of autotuning is a significant disadvantage: kernel performance on modern GPUs is highly sensitive to tile sizes, and XLA's heuristics often miss optimal configurations. XLA is also not designed for inference-specific optimizations like KV cache management or continuous batching, which are implemented at the engine level (e.g., vLLM, TensorRT-LLM) rather than in the compiler.

Notes

XLA (Accelerated Linear Algebra) is Google's ML compiler, originally developed for TensorFlow and now part of the OpenXLA project. It is the only production compiler that targets TPUs, making it essential for TPU-based inference. For NVIDIA GPUs, XLA is less commonly used directly; instead, JAX and PyTorch models are often compiled with Triton or hand-written CUDA kernels. XLA's strength is its integration with the TensorFlow/JAX ecosystem and its mature optimization pipeline. However, for LLM inference on NVIDIA GPUs, XLA is not the primary compilation path. The lack of autotuning is a significant disadvantage: kernel performance on modern GPUs is highly sensitive to tile sizes, and XLA's heuristics often miss optimal configurations. XLA is also not designed for inference-specific optimizations like KV cache management or continuous batching, which are implemented at the engine level (e.g., vLLM, TensorRT-LLM) rather than in the compiler.

Cross-references

This record references no other records — it is a leaf. It is cited by 0.