Skip to content
IJK

TorchTPU: A Native PyTorch Backend for TPU

By IJK ·

What Hugging Face's post says TorchTPU is, which libraries run natively on TPU and what it says about the older PyTorch/XLA path.

What runs natively

Transformers, Diffusers and Kernels run natively on TPU. [1]

runsavoidsTorchTPUa native PyTorch backendTransformers, Diffusers and Kernelsrun natively on TPUThe older pathgraph recompilations and hard-to-reason-about deb...
Which libraries run natively?

The path it replaces

Until now, running PyTorch on TPUs meant going through PyTorch/XLA (torch_xla). [2]

Small changes could trigger graph recompilations, and debugging was hard to reason about. [3]

Sources

  1. The Hugging Face source says: Transformers, Diffusers and Kernels run natively on TPU. Hugging Face and TorchTPU
  2. The Hugging Face source says: Until now, running PyTorch on TPUs meant going through PyTorch/XLA (torch_xla). Hugging Face and TorchTPU
  3. The Hugging Face source says: Small changes could trigger graph recompilations, and debugging was hard to reason about. Hugging Face and TorchTPU

Editorial (AI-assisted; automatically checked, not human-reviewed). Each statement is linked to its source; check the source before relying on a detail.

  • pytorch
  • tpu
  • hugging face
  • transformers