⚡Google and Meta Open-Source TorchTPU, Bringing Native PyTorch to TPUs
Your PyTorch code can finally run on TPUs
TL;DR
Google and Meta open-sourced TorchTPU, a native PyTorch backend for Google TPUs. Existing PyTorch code runs with minor changes, and eager mode finally gets first-class treatment. If you've avoided TPUs because of porting pain, this is the moment to re-test.
Google and Meta just open-sourced TorchTPU, a native PyTorch backend for Google TPUs. The pitch is simple: your existing PyTorch code runs on TPUs with minor edits, not the intrusive rewrites that made the old path painful. If you've been stuck on GPUs because porting was a nightmare, this changes your math. Moving from GPU to TPU mostly means swapping the cuda device for tpu and the nccl backend for tpu_dist. Eager execution is a first-class citizen now, which matters because the old PyTorch/XLA path never supported it properly. The numbers are worth a look. Google ran a 30B-parameter Muse Glimmer model on a single TPUv7 chip at 25.7k tokens/s at 5120 sequence length, and 22.4k tokens/s at 10,240. Training on four TPUv7 chips hit 5.6k and 4.6k tokens/s at the same lengths. Qwen3 MoE 235B was scaled from 1,024 to 8,192 TPUv7 chips. The catch? Google calls the project early-stage and still evolving, so treat it as a serious option to test, not a drop-in default for production.

Key Points
DeferAndFuse, a new hybrid eager and compiled mode, can run 50% or more faster than Strict Eager while reducing peak HBM memory usage on TPU hardware.
Keep reading — it's free
Enter your email to keep reading — plus the best of AI & tech, daily. Free, forever.
Already a member? Sign in
Comments
Be the first to comment