SignalStack
Back to feed

Google Open-Sources TorchTPU, a Native PyTorch Backend for Cloud TPUs

Read original

AI summary

Google open-sourced TorchTPU, a native PyTorch backend that simplifies TPU usage and replaces PyTorch/XLA for new workloads.

AI-generated summary. Check the original reporting for context and accuracy.

Source excerpt

This is the available feed excerpt, which may be shortened or in the publisher’s original language.

Google has open-sourced TorchTPU, a native PyTorch backend for Cloud TPUs. It was co-developed with the PyTorch team at Meta and announced at PyTorch Conference 2026 on October 20, 2026. Existing PyTorch code targets a TPU through a standard torch.device("tpu"). TPUs now sit beside GPUs and CPUs as a native PyTorch device. Google team states that TorchTPU replaces PyTorch/XLA and recommends it for all new workloads. TL;DR Size: A software stack, not a model. 4 open repos: TorchTPU, vLLM-TorchTPU, SGLang-TorchTPU, TorchTitan. TorchTPU is v0.2.0 on PyPI, Python 3.11+, Apache 2.0. Runs on: Google Cloud TPUs. Tested on generations from v5e, scaled to 8,192 Ironwood (TPU7x) chips. Serving supports FP8, MXFP4 and NVFP4 checkpoints. Performance: Eager mode for debugging, torch.compile for production-level throughput. Best: 52% MFU training Qwen 3 8B with TorchTitan on Ironwood (self-reported). Worst: Out-of-box eager took 11.49s per step in a fine-tuning case, versus 2.78s fully tuned. What is TorchTPU? TorchTPU is an open-source PyTorch backend from Google and Meta that runs PyTorch models natively on TPUs. It plugs in through PyTorch’s PrivateUse1 interface. Tensors are ordinary PyTorch tensors, with no subclasses or wrappers. It runs one process per device and preserves tensor views and in-place mutations. The predecessor, PyTorch/XLA, recorded lazy-tensor graphs. Developers often added code to mark compilable regions. PyTorch/XLA also only supported pure SPMD code. TorchTPU also handles divergent MPMD execution. How does TorchTPU execute PyTorch code? TorchTPU ships 3 eager modes: Strict (default): dispatches each operator asynchronously with standard PyTorch semantics. Debug: runs synchronously with tensor bounds checking. DeferAndFuse: fuses runs of eager operators to cut HBM traffic. The TorchTPU paper says it can be 50% or more faster than Strict. For peak speed, torch.compile(backend="tpu") captures the graph with TorchDynamo. It lowers through Stab

About priority

An automated sorting aid based on source trust, keywords, and entities, on a scale of 1–12. High: 9–12; medium: 6–8; low: 1–5. It does not measure urgency, verify reporting, or indicate editorial endorsement.

More in this topic