DevelopersCompare

TorchTPU vs TorchNeuron: running PyTorch on Google TPUs and AWS Trainium compared (October 2026)

TorchTPU vs TorchNeuron: in the same week of October 2026, Google and Amazon open-sourced native PyTorch backends for their AI chips. Both register a new device through PyTorch's PrivateUse1 hook and replace an older PyTorch/XLA path. Here's how they compare on status, chips, PyTorch versions, torch.compile, distributed training and the code you change, per the official docs.

Living comparison · Checked
A lit glass code block with two dashed arrows down to two glass chips with pins, on a teal gradient, titled Different chips

In 20 seconds

  1. Google open-sourced TorchTPU, a native PyTorch backend for Cloud TPUs built with Meta's PyTorch team, on October 20, 2026; version 0.2.0 reached PyPI on October 19. Its FAQ says it supports TPU v5e, v5p, Trillium (v6e) and Ironwood (v7x), and Google Cloud's docs say 'TorchTPU replaces PyTorch/XLA.'
  2. Amazon's TorchNeuron shipped as a public beta in Neuron 2.33.0 on October 19, 2026, for PyTorch 2.13 and 2.14 on Trainium2 and Trainium3, and was open-sourced on October 20. Both are Apache 2.0 and plug into PyTorch through its PrivateUse1 extension point.
  3. In code, TorchTPU uses device 'tpu', torch.compile backend 'tpu' and process-group backend 'tpu_dist'; TorchNeuron uses 'neuron' for all three. Both compile with static shapes by default (dynamic=False). Google's docs and posts give TorchTPU no beta or GA label, though its PyPI package is classified as beta; AWS calls TorchNeuron a beta.
Contents

TorchTPU vs TorchNeuron is the new choice for PyTorch developers who want to run on cloud AI chips that aren't Nvidia GPUs. On October 20, 2026, Google open-sourced TorchTPU, a native PyTorch backend for its Tensor Processing Units, a day after Amazon shipped TorchNeuron, its native backend for Trainium, as a public beta. Both let ordinary PyTorch code target the custom accelerators in Google's and Amazon's AI datacenters by changing the device name, and both replace an older route through PyTorch/XLA. This comparison sets out, as of October 23, 2026, how they differ.

This comparison is based on Google's and the PyTorch Foundation's October 20 announcements, the TorchTPU documentation (version 0.2.0), repository and PyPI page, AWS's Neuron 2.33.0 release notes and the torch-neuronx repository, checked October 23, 2026. It covers what the docs say, not how fast either runs. For the TorchNeuron launch itself, see our TorchNeuron story.

The short version

  • Same idea, different chips. Both register a new PyTorch device through PrivateUse1: tpu for Google TPUs, neuron for AWS Trainium2 and Trainium3.
  • Status: TorchTPU is version 0.2.0. Google's docs and announcements give it no alpha, beta or GA label, though its PyPI package metadata says "Development Status :: 4 - Beta"; Google's FAQ calls it "the new official standard" for PyTorch on TPUs. TorchNeuron is a public beta in AWS's Neuron 2.33.0.
  • License: Apache 2.0 for both.
  • PyTorch versions: TorchNeuron names 2.13 and 2.14. TorchTPU's docs give no supported range; its 0.2.0 package on PyPI requires PyTorch 2.11.0 to 2.15.0.
  • Compiled mode: torch.compile(model, backend="tpu") or backend="neuron"; both default to static shapes.
  • Distributed: both ship their own c10d process-group backend (tpu_dist, neuron) and support DTensor and DDP; FSDP2 is listed as experimental, with low performance, for TPUs and as supported for Trainium.
  • The old path: Google Cloud says "TorchTPU replaces PyTorch/XLA." AWS ended PyTorch/XLA training support from Neuron 2.30.0 but keeps it for inference.

How do TorchTPU and TorchNeuron compare?

TorchTPU (Google)TorchNeuron (AWS)
Built byGoogle, with the PyTorch team at MetaAWS (announced on the PyTorch blog)
Open-sourcedOctober 20, 2026, at PyTorch ConferenceOctober 20, 2026, at PyTorch Conference
Current release0.2.0 on PyPI (October 19, 2026)Neuron 2.33.0 (October 19, 2026); torch-neuronx 2.13.3.0 and 2.14.3.0
Status labelNone in docs or posts; PyPI metadata: "Beta"; FAQ: "the new official standard"Public beta; repository titled "torch-neuronx (Beta)"
LicenseApache 2.0 (one example folder MIT)Apache 2.0
ChipsTPU v5e, v5p, Trillium (v6e), Ironwood (v7x); v8i and v8t on the roadmapTrainium2, Trainium3 (Trn2, Trn3 instances)
Not supportedOlder TPUs aren't listedInferentia2, Trainium1 (stay on PyTorch/XLA)
PyTorch versionsNo range in docs; 0.2.0 package requires 2.11.0 to 2.15.02.13 and 2.14
Python3.11 or later (wheels for 3.11 to 3.14)3.12 to 3.14
Installpip install torch_tpu on a TPU VM or GKEpip install torch-neuronx from the AWS Neuron repository
Device in codetpuneuron
How it hooks inPrivateUse1 backend, renamed to tpu on importPrivateUse1 backend
Eager modeYes: Strict (default), Debug, DeferAndFuseYes, the default; "adaptive eager" experimental
torch.compilebackend="tpu": Dynamo to StableHLO to the XLA compiler, no TorchInductor; dynamic=False by defaultbackend="neuron"; requires dynamic=False and mode="default"
Custom kernelsPallas and Tokamax (validated); Helion (experimental)NKI (Neuron Kernel Interface)
Process-group backendtpu_distneuron
Older pathPyTorch/XLA: "replaced" (Google Cloud docs)PyTorch/XLA: no training from Neuron 2.30.0; inference continues; PyTorch 2.9 is its last version

Table 1The two backends mirror each other in design; the clearest differences are the status label, the chips and the PyTorch versions each names. Source: TorchTPU docs, README, PyPI and pyproject.toml; Google Cloud docs; AWS Neuron 2.33.0 release notes; torch-neuronx README; PyTorch blog.

Last verified: October 23, 2026 (every cell with its source link is in our data file D31-torchtpu-vs-torchneuron.csv)

Two cells need context. TorchTPU's GitHub page reports its license as "Other" because the license file adds an MIT section for one example folder (examples/mingpt/impl); the README and pyproject.toml declare Apache 2.0. And the PyTorch range and the "Beta" label both come from the 0.2.0 package's metadata on PyPI (torch>=2.11.0,<=2.15.0 and "Development Status :: 4 - Beta"), which matches the repository's v0.2.0 tag. Google's docs and announcements for 0.2.0 give neither; the docs' API reference says only that its torch.accelerator APIs need PyTorch 2.11 or later. The main branch, already numbered 0.2.1, drops the upper bound and requires PyTorch 2.11.0 or later.

What code do you change?

Mostly the device and the distributed backend. TorchTPU's introduction says porting from GPUs "starts with changing device="cuda" to device="tpu" and backend="nccl" to backend="tpu_dist"." The PyTorch blog post on TorchTPU gives this before-and-after:

PYTHON
# GPU
device = torch.device("cuda")
dist.init_process_group(backend="nccl")

# TPU
device = torch.device("tpu")
dist.init_process_group(backend="tpu_dist")

For TorchNeuron, the PyTorch blog's example is model = MyModel().to('neuron'), and the release notes use init_process_group(backend="neuron").

Both teams also point to PyTorch's device-agnostic API. TorchTPU's docs say the backend works with torch.accelerator.current_accelerator(), and the TorchNeuron blog says code written against torch.accelerator "runs unmodified." Hugging Face integration differs slightly: Google's post shows device_map="tpu" in Transformers v5, while the TorchNeuron blog says device_map="auto" detects Neuron.

The harder change is from the older XLA path. AWS calls moving off torch_xla and xm.xla_device() a breaking change. The PyTorch blog's TorchTPU post says PyTorch/XLA "required intrusive source-code modifications to explicitly define compilable regions," which TorchTPU is designed to avoid.

Neither vendor promises full speed from the device swap alone. The TorchTPU post says "one cannot achieve peak TPU performance with that simple change," but the model "should run out of the box."

How do eager mode and torch.compile differ?

Both run eager by default, one operation at a time, and both offer torch.compile for production.

  • TorchTPU has three eager modes. Strict, the default, dispatches one ATen operator at a time asynchronously. Debug (TORCH_TPU_LAUNCH_BLOCKING=1) runs synchronously. DeferAndFuse (TORCH_TPU_DEFER_AND_FUSE=1) batches operations, which the PyTorch blog says "can be 50% or more faster than Strict Eager." That figure is vendor-reported with no stated method. Its compiled mode hands the whole FX graph to Google's XLA compiler as one StableHLO program and doesn't use TorchInductor.
  • TorchNeuron runs eager by default, with an experimental "adaptive eager" mode switched off. Its torch.compile backend requires dynamic=False and mode="default", and AWS warns that "each new input shape can require another compilation."

Static shapes are the shared limit. Google's docs say torch.compile sets dynamic=False by default on TPUs, and the PyTorch blog post explains that bounded dynamism, which dynamic shapes need, is "not enabled by default yet."

Which distributed training APIs work?

TorchTPUTorchNeuron
Process-group backendtpu_dist (c10d::Backend)neuron (c10d)
DDPNamed as working (docs)Supported
FSDP2Named as working (distributed docs); "Experimental," low performance (feature set)Supported (fully_shard)
SimpleFSDPValidatedSupported (PyTorch blog)
DTensor and DeviceMeshSupportedSupported, for tensor and sequence parallelism
Pipeline parallelismNot listed as a frameworktorch.distributed.pipelining
Context parallelismMentioned in mesh guidance (Ring Attention)Experimental, for scaled dot-product attention
Largest scale statedMulti-slice up to 8K chips (validated)Not stated

Table 2TorchTPU states the larger validated scale; TorchNeuron lists more of PyTorch's parallelism APIs as supported. Source: TorchTPU feature set and distributed support pages; AWS Neuron 2.33.0 release notes; PyTorch blog (TorchNeuron).

Last verified: October 23, 2026

TorchTPU's docs say standard torch.distributed calls work in both eager and compiled modes, launched with torchrun after setting topology variables. By default each collective runs as its own small program, which the PyTorch blog says can cost "e.g., 30-40% end-to-end" until you fuse them with its @spmd_safe decorator.

What are the known limits?

Diagram: PyTorch code reaching Google TPUs through TorchTPU and AWS Trainium through TorchNeuron, both via PrivateUse1Diagram: PyTorch code reaching Google TPUs through TorchTPU and AWS Trainium through TorchNeuron, both via PrivateUse1
Figure 1Both backends plug into PyTorch at the same PrivateUse1 hook; TorchTPU hands graphs to Google's XLA compiler, TorchNeuron to AWS's Neuron stack. · Illustration: 9to5AI

TorchTPU, per Google's docs and the PyTorch blog:

  • about 450 ATen operators implemented;
  • static shapes by default, with recompilation when shapes change;
  • a default medium matmul precision (BF16 multiply, FP32 accumulate), unlike CUDA's highest; the blog says high or highest cost about 3x or 6x the matrix-unit compute;
  • no native FlexAttention yet;
  • custom Pallas kernels still need JAX installed to author, though the runtime has no JAX dependency;
  • the README's "Dependencies" section still reads "TBD."

TorchNeuron, per AWS's release notes and README:

  • no torch.sparse, torch.func, torch.nested or torch.distributions;
  • no TorchAO integration or composite MXFP8 support;
  • dynamic shapes "still in development";
  • only contiguous tensors, and float64 runs as float32 (README);
  • Ubuntu 22.04 and 24.04 wheels "Planned for the next release."

How mature are the docs and ecosystems?

TorchTPU arrives with a dedicated documentation site for version 0.2.0: getting-started guides for TPU VMs and GKE, a feature-set page that separates "Validated" from "Experimental," an API reference, an FAQ, and case studies including Meta's open-weight Muse Glimmer 30B. Google also open-sourced vLLM-TorchTPU, SGLang-TorchTPU and a TorchTPU integration of TorchTitan the same day, and lists Ray, TorchRec and Hugging Face integrations.

TorchNeuron's documentation lives inside AWS's broader Neuron docs, with release notes and a "What is TorchNeuron?" overview. As our TorchNeuron story noted, AWS pages gave different minimum PyTorch versions as the backend moved from private to public beta. AWS lists TorchTitan, Hugging Face Transformers, Diffusers and trl among supported libraries.

Both vendors publish performance figures, all vendor-reported and not comparable with each other. Google says TorchTitan reached up to 52% model FLOPs utilization on Qwen 3 8B across up to 8,192 Ironwood TPUs, giving no method. The TorchNeuron blog post quotes Deepgram's claim of about 60% more audio processed per dollar than its GPU baselines. Neither was run under shared conditions, so they say nothing about which chip is faster.

Recommendation by use case

If you…Start withWhy
Already run training or inference on Google Cloud TPUs with PyTorch/XLATorchTPUGoogle Cloud recommends migrating PyTorch/XLA workloads to it
Run on AWS Trn2 or Trn3 instancesTorchNeuronIt's the only native PyTorch backend for those chips, and XLA training support has ended
Run Inferentia2 or Trn1Stay on PyTorch/XLA (torch-neuronx)TorchNeuron doesn't support those instances
Need a pinned, documented PyTorch versionTorchNeuronAWS documents 2.13 and 2.14; TorchTPU's 0.2.0 docs give no range, though its package accepts 2.11.0 to 2.15.0
Want validated FSDP at large scaleTorchTPU, using SimpleFSDPIts feature set lists multi-slice training up to 8K chips as validated; FSDPv2 is experimental
Rely on torch.func, torch.sparse or TorchAOCheck before moving to eitherTorchNeuron lists them as unsupported; TorchTPU's docs don't list them
Need production stability guaranteesTreat both as earlyTorchNeuron is labeled beta; TorchTPU is at 0.2.0, its PyPI package is classified beta, and Google states no support level

Table 3Our starting points by situation, based only on the documented status, chips, versions and APIs above; none rests on a performance test.

Last verified: October 23, 2026

The bigger context is cloud chip competition. TechCrunch's October 20 headline, by Julie Bort, put it as "Google has joined Amazon in attacking Nvidia's stronghold with AI app developers." Software has long been the obstacle to using custom chips, and both backends aim at it. The capacity behind them is tracked in our gigawatt datacenter analysis, and Google's other bid for enterprise AI buyers that week, selling OpenAI's models, is covered in our OpenAI on Google Cloud story.

What's confirmed, reported and uncertain

  • Confirmed (official docs, repos and posts): every cell in the tables above, as of October 23, 2026.
  • Conflicting: TorchTPU's GitHub page shows the license as "Other," while the README and package metadata say Apache 2.0; the license file adds MIT terms for one example folder. Google's FAQ says "PyTorch/XLA is deprecated," while Google Cloud's PyTorch page says TorchTPU "replaces" it and doesn't use the word. TorchTPU's docs and announcements give no status label, while its PyPI metadata says "Beta."
  • Vendor-reported: all performance numbers, including DeferAndFuse speedups, MFU figures and Deepgram's cost claim.
  • Uncertain: whether Google supports the whole PyTorch 2.11.0 to 2.15.0 range that TorchTPU 0.2.0's package accepts, when TorchNeuron leaves beta, and when either supports dynamic shapes without recompilation.

About this story

Based on the sources linked below. How we report: Editorial standards.

Written byShajanthan YogeswaranFounder & Editor-in-ChiefMore from Shajanthan
Was this useful?