Google, Meta Open-Source TorchTPU for TPUs

The project brings native PyTorch support to Google's tensor processing units, letting developers run existing PyTorch workloads with minor code changes.

Updated on Nov. 2, 2026 in Artificial Intelligence

Isometric editorial illustration of rows of unlabeled dark-gray accelerator modules in an open rack, linked by color-coded cable bundles.
Google and Meta have open-sourced TorchTPU, a native PyTorch backend that lets developers run existing PyTorch code on Google's tensor processing units with minor changes. AI Illustration. Upload story photo >

Google and Meta have open-sourced TorchTPU, a native PyTorch backend for Google TPUs. The project supports eager and compiled execution, distributed computing, and hardware-specific optimizations.

Why it matters

Earlier PyTorch/XLA support required intrusive source-code changes and suffered from slow compile times, limiting adoption on TPUs. A native backend that prioritizes eager execution aims to make moving PyTorch workloads from GPUs to TPUs considerably simpler.

Google's internal pipeline reports 25.7k token/s inference throughput for a 30-billion parameter model on a single TPUv7 chip at 5120 sequence length, with 5.6k token/s training throughput on four chips. Independent benchmarks have not been published, and performance at longer sequence lengths and across larger chip counts is still being characterized.

The players

Google

Google, the technology company that develops the Tensor Processing Units that TorchTPU targets, has supported PyTorch workloads on its TPUs since its PyTorch/XLA effort began in 2020.

Meta

Meta, the company behind the PyTorch deep learning framework, collaborated with Google on developing and open-sourcing TorchTPU.

The details

TorchTPU lets developers identify available hardware through the torch.accelerator.current_accelerator API, and migrating code from GPUs typically means replacing the cuda device with tpu and the nccl backend with tpu_dist. The backend offers three eager execution modes: strict, debug, and DeferAndFuse.

Timeline

  1. 2020: Google began enabling PyTorch workloads on TPUs through PyTorch/XLA.

  2. November 2, 2026: Google and Meta announced the open-sourcing of TorchTPU.

The Tech Race

TorchTPU follows Google's 2020 PyTorch/XLA effort, which required source-code modifications to define compilable regions and struggled with compile latency. The native backend represents a departure from that approach and an attempt to make TPUs a more practical alternative to Nvidia GPUs for PyTorch developers.

Developers already running PyTorch models on GPUs may be able to move workloads to TPUs with minor code changes such as swapping device names and distributed backends. Teams should still validate performance on their own models, since the published throughput figures come from Google's internal testing.

The takeaway

For developers evaluating hardware, TorchTPU lowers the cost of testing TPUs alongside PyTorch code already in use. Benchmarking representative models before committing to a migration remains the practical next step.

Further reading

Explore more on Artificial Intelligence for context on frameworks and hardware accelerators used in model development.