Google open-sources TorchTPU, a native PyTorch back end for TPUs
Google has open-sourced TorchTPU, a new backend that allows PyTorch models to run on Google's Tensor Processing Units. The project includes custom kernels, compilation caching, and support for distributed training.
Why it matters
This tool lowers the barrier for developers to utilize specialized AI hardware, potentially accelerating research and model deployment.
This project provides a PyTorch backend for Google's Tensor Processing Units (TPUs), enabling users to run PyTorch models and operations on TPU devices. It includes custom ATen kernels for various PyTorch operations, a compilation cache for optimizing execution, and examples for distributed training and model inference.
PyTorch ATen kernel implementation for TPU. Compilation cache for optimized execution of XLA computations. Support for distributed training (Data Parallelism, Tensor Parallelism). Examples for various models (Llama, Qwen, ResNet, DLRM, minGPT, UNet). Integration with torch.compile() for graph mode execution. Utilities for debugging and benchmarking. User Guide and Interactive Notebooks A user guide is available at https://torchtpu.readthedocs.io/ . This is a static version of the interactive notebooks. They are available in the docs folder.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in