PyTorch Code Now Runs on Google TPUs
The open-source TorchTPU backend keeps eager execution, a shipped release with benchmarks still reported by Google alone.
Updated on Nov. 2, 2026 in Artificial Intelligence

Google and Meta have open-sourced TorchTPU, a native PyTorch backend for Google's TPU accelerators. The project is released as open source, so it is shipped code rather than a research preview, though the stub does not state a general-availability version number.
Why it matters
PyTorch dominates AI research and has long been tied to Nvidia GPUs in practice, which has limited how easily developers could move workloads to TPUs. A native backend that keeps eager execution, the mode most PyTorch users rely on, lowers that switching cost and makes Google's custom silicon a more realistic option for mainstream model development.
The benchmarks come from Google's own testing: a 30-billion parameter model ran at 25.7k tokens per second for inference on a single TPUv7 chip, and training on four chips reached 5.6k tokens per second at a 5120 sequence length. Google reports DeferAndFuse eager mode as 50% or more faster than its strict eager mode, but the extraction provides no independent GPU comparison.
The players
Builds the TPU accelerator line and the JAX and TensorFlow ecosystems, and is now extending its custom silicon to PyTorch, the framework most used for AI research.
Meta
Creator of PyTorch, the open-source deep learning framework, and co-developer of TorchTPU.
The details
TorchTPU is designed so that developers can keep PyTorch's eager execution, the mode where operations run immediately and can be inspected step by step. The earlier route, PyTorch/XLA, required intrusive code changes to mark compilable regions and suffered long compile delays. TorchTPU offers three eager modes (strict, debug, and DeferAndFuse), with DeferAndFuse batching operations to fuse them before execution. Migrating existing code is mostly a matter of replacing the cuda device with tpu and the nccl distributed backend with tpu_dist.
Timeline
2020: Google began enabling PyTorch workloads on TPUs through PyTorch/XLA.
- 2026-11-02
Google and Meta announced the open-sourcing of TorchTPU.
The Tech Race
TorchTPU positions Google's TPUs against Nvidia's GPU software dominance by targeting the framework most AI researchers already use. It follows Google's 2020 PyTorch/XLA work, which the stub describes as slow to compile and unable to support eager execution.
Developers with existing PyTorch code can move workloads to TPUs with minor modifications, mainly swapping device and distributed-backend identifiers. The stub does not give pricing, general availability dates, or hardware-access terms for TPUv7.
The takeaway
TorchTPU suggests Google is trying to make custom AI silicon usable without rewriting PyTorch code, which could widen the hardware choices open to model developers. Watch for independent benchmarks against GPUs on the same models, and for the roadmap items Google lists, including dynamic shapes, compilation performance, and quantization.
Further reading
For background on how these accelerator frameworks are reshaping model development, see Artificial Intelligence.






