Google and Meta have open-sourced TorchTPU, a native PyTorch backend intended to make Google’s Tensor Processing Units work more like first-class targets alongside CPUs and GPUs. Meta says it plans to move larger language-model workloads onto TPUs using the project.

The backend replaces the older PyTorch/XLA bridge. A developer can start by changing a device instruction from `model.to("cuda")` to `model.to("tpu")`, and the teams say Hugging Face models, vLLM, SGLang and TorchTitan can run through the new integration. Four repositories cover the core backend, inference engines and large-scale training.

That one-line change provides compatibility, not peak performance. Google cautions that model shapes, operations and sharding strategies optimized for GPUs may need substantial tuning for TPUs. Its published example scaled a Qwen3 235B mixture-of-experts model across 8,192 TPU v7x chips, while a preview agent suite is meant to help diagnose and optimize workloads.

AWS introduced a similar native PyTorch backend for Trainium in public beta the same week, but its first release lacks dynamic input support and skips many PyTorch tests. Common framework interfaces can reduce migration work, yet optimization, hardware availability and cloud supply remain vendor-specific. Teams evaluating TorchTPU should confirm capacity and budget for tuning before treating PyTorch compatibility as hardware portability.