Skip to main content
Open Source

PyTorch Adds TPU Support via Open-Source TorchTPU

PyTorch Blog announces TorchTPU, an open-source project enabling TPU programming through XLA and custom kernels.

By Precis Daily Newsroom1 min read146 words
AI-summarized from the linked source and published automatically — not human-edited.How this works →
Illustration for: PyTorch Adds TPU Support via Open-Source TorchTPU
Illustration

What happened

PyTorch Blog has released TorchTPU, an open-source project that allows developers to program Google’s TPU using the XLA compiler stack at a lower level than the Python framework.

TorchTPU enables users to create custom kernels using JAX/Pallas and the Helion DSL, offering greater flexibility in TPU development.

Why it matters

The integration of TorchTPU into PyTorch supports large-scale workloads by introducing JIT compilation for eager execution and runtime optimizations, aiming to compete with PyTorch on GPUs.

Key details

TPUs are programmed through the XLA compiler stack using two entry points: StableHLO and Mosaic. The actual TPU instruction set architecture (ISA) remains proprietary and not publicly available.

TorchTPU has validated DTensor-based sharding and multi-host inference workloads using vLLM and SGLang. It also supports PyTorch distributed idioms like DDP, FSDP, and DTensor through TPU collectives at the lowest level of the PyTorch stack.

Sources

Summarized from the linked originals.

Related stories