# pytorch/xla

Enabling PyTorch on XLA Devices (e.g. Google TPU)

Repository: https://github.com/pytorch/xla
Canonical: https://ross.abutalabs.com/products/pytorch-xla
Homepage: https://pytorch.org/xla
Language: C++
License: NOASSERTION
License Family: other
Topics: compiler, deep-learning, pytorch, xla
Last push: 2026-05-27T19:58:05+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 84, release rhythm 33, longevity 100
- inputs: {"age_days": 2858, "days_push": 98, "days_rel": 289, "gap_med": 91, "n_releases_24m": 6}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2803, forks 570 (observed 2026-08-28T04:07:22.701664+00:00)

## What it is
PyTorch/XLA is a Python package that connects the PyTorch deep learning framework to XLA devices such as Google Cloud TPUs via the XLA deep learning compiler. It enables training and inference of PyTorch models on TPU hardware, with distributed support via PJRT and custom kernel support through Pallas.

## Use cases
- train pytorch models on google cloud tpu
- run stable diffusion on tpu
- distributed pytorch training on tpu vms
- port existing pytorch code to tpu hardware
- run pytorch on kaggle free tpu
- write custom tpu kernels with pallas

## When to choose
- you need to run PyTorch workloads on Google Cloud TPUs or Kaggle TPU VMs
- you want distributed PyTorch training across TPU pods with PJRT
- you want to experiment with PyTorch on TPU for free via Kaggle notebooks

## When to avoid
- you only train on GPUs or CPUs - standard PyTorch suffices
- you need a fully native TPU backend - wait for TorchTPU, which will replace this project
- you depend on pre-C++11 ABI wheels or Python versions older than 3.11 in recent releases

## Facets
- artifact type: library
- maturity: active
- function: deep-learning, compiler, machine-learning, gpu-computing
- domain: deep-learning, machine-learning, gpu-computing
- platform: python, cloud
- tags: pytorch, tpu, xla, torchtpu, lazy-tensor-tracing, distributed-training, linux

## Member repositories
- pytorch/xla (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:22.701664+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:14:31.881675+00:00, confidence not recorded.
  - readme: https://github.com/pytorch/xla (fetched 2026-08-28T04:07:22.701664+00:00, sha ba454fc6a76b)
  - homepage: https://pytorch.org/xla (fetched 2026-08-29T09:54:27.654761+00:00, sha 430678b24f5c)
  - site_page: https://docs.pytorch.org/xla/release/r2.8/index.html (fetched 2026-08-29T09:54:27.663955+00:00, sha bfe7e85e1cdf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
