← News

Amazon diagram of the TorchNeuron stack: PyTorch code running through the TorchNeuron backend and AWS Neuron compiler onto an AWS Trainium chip

19 Oct 2026

Amazon

Amazon's TorchNeuron lets PyTorch code run on its Trainium chips with one setting change, taking aim at Nvidia's software moat

Amazon said on Monday, Oct. 19, 2026, that TorchNeuron, a native PyTorch backend for its AWS Trainium AI chips, lets developers run existing PyTorch code on Trainium with a single configuration change instead of a rewrite, and that it will be released as open source on Oct. 20.

Nvidia's real lock-in was never just the chip; it's the decade of CUDA work that makes PyTorch code run fast on its hardware. TorchNeuron goes after exactly that: if switching to Trainium is one line instead of a months-long port, the question becomes price and availability, which is where Amazon wants the fight. "No rewrite" claims usually come with an asterisk — custom CUDA kernels won't move for free — and the open-source code only lands tomorrow. But with Meta's PyTorch team on stage and Hugging Face already wired in, this is the most serious attempt yet to make "which chip?" a setting instead of a strategy.

TorchNeuron is a native PyTorch backend for AWS Trainium. A backend, here, is the software layer that lets PyTorch talk to a chip. Trainium is Amazon's own family of AI chips. Developers point code at the chip with .to('neuron') instead of .to('cuda'). CUDA is Nvidia's software layer for its graphics chips. Code written against PyTorch's device-agnostic torch.accelerator APIs needs no change. For compiled production runs, torch.compile uses backend="neuron". AWS docs call the port "minimal changes," not always literally zero, for code that is written specifically for CUDA. Those lines are Amazon's and AWS's.

It plugs into PyTorch's own extension points for new hardware — the PrivateUse1 device backend and torch.accelerator APIs. PrivateUse1 is PyTorch's hook for chips that are not CUDA. It supports eager execution, including a new adaptive eager mode, torch.compile, and the Neuron Kernel Interface for custom kernels, on Trainium2 and Trainium3, plus PyTorch distributed APIs. Eager execution means the code runs as it is written, line by line. torch.compile is PyTorch's tool for speeding up a model by compiling it. Profiling runs through the standard torch.profiler via Neuron Explorer. Those lines are Amazon's and AWS's.

It will be released under Apache 2.0 at github.com/aws-neuron/torch-neuronx as a public beta on Oct. 20, at PyTorch Conference North America in San Jose. Apache 2.0 is a license that lets anyone use, copy and sell the code. The repository was not yet public on Oct. 19.

Amazon says 85% of AI researchers and developers write code in PyTorch, that it tests TorchNeuron against hundreds of thousands of models on every build, and that it is contributing changes upstream to make PyTorch more hardware-agnostic. Hugging Face has enabled native Trainium support in its tools. Early users named by Amazon include Cartesia and the Lieber Institute for Brain Development. Those lines are Amazon's. Amazon did not publish specific speedups or cost-savings percentages.

Reuters reports that Colin Brace, vice president of software at Amazon's Annapurna Labs chip unit, said more than 30 early customers — spanning robotics, world models and voice AI — are using it, and that switching can bring steep cost savings. "This has been about meeting customers where they're at," Brace said, as Reuters prints it. Reuters frames the move as an attempt to erode Nvidia's CUDA software advantage, and notes Google is also courting developers with better PyTorch tools for its own chips. Those lines are Reuters'. TorchNeuron is for Amazon's Trainium chips on AWS. The announcement does not say the same backend works on other companies' accelerators.

Meta's Jana van Greunen, director of PyTorch engineering, is quoted in the PyTorch post welcoming native Trainium support as expanding hardware choice. That quotation is hers, as the PyTorch Foundation prints it.

The picture is Amazon's official diagram of the TorchNeuron stack: PyTorch code running through the TorchNeuron backend and the AWS Neuron compiler onto an AWS Trainium chip. It is the launch graphic from Amazon's announcement.

In plain terms, Amazon said on Monday that TorchNeuron will let existing PyTorch code run on Trainium by pointing at .to('neuron') instead of .to('cuda'), with open-source code due Tuesday at the PyTorch Conference. Code written for PyTorch's generic device APIs needs no change; CUDA-specific code still needs work. Reuters counts more than 30 early customers and casts it as a shot at Nvidia's software lock-in. No speedup or savings percentage was published.

RELATED

ONLINE…

Comments

guidelines

Loading…

Loading…

Sources