Two accelerators stopped fighting Nvidia on benchmarks and started fighting it on paperwork, in the same week.

Amazon announced TorchNeuron on October 19 and open sourced it at PyTorch Conference North America on October 20. It runs your existing PyTorch code on Trainium after a single configuration change. No rewrite.

Google and Meta released TorchTPU the same day, a 53-author paper and an open source release that gives PyTorch a native backend for Google's TPUs. And Hugging Face's PyTorch team shipped the 2.15 notes showing FP8 tensors arriving on Apple's MPS backend.

All three are attacking the same surface. PyTorch is the toolkit Amazon says 85 percent of AI researchers and developers write in. Nvidia's CUDA spent fifteen years becoming the invisible default underneath it.

That lock just became the thing every competitor can aim at, because the toolkit was never Nvidia's to begin with.

Here is the thesis. The competitive question in accelerators has moved from peak FLOPS to migration cost. If your model moves with one config line, the moat is no longer the ecosystem. It is capacity, price, and whatever the backend exposes. If you are signing a multi-year capacity contract this quarter, read this first.

WHAT A BACKEND ACTUALLY IMPLEMENTS

A torch backend is the layer beneath your Python that turns operations into work on a specific chip. Your model never talks to silicon. The layer does.

Four things live in it, and each one is a place your port can fail.

Dispatch is the routing table. It decides which kernel handles which operator when your code says torch.matmul. Compilation is graph capture and fusion, which turns a sequence of operations into one optimized unit instead of forty launches. Kernel selection picks which implementation runs, because a chip usually has several matmul paths and the wrong one is slow, not incorrect. Memory layout is how tensors sit in physical memory, and a layout mismatch shows up as a copy, and the copy shows up in your bill.

This is the machinery CUDA provided for years. "It just works on Nvidia" was never magic. It was fifteen years of backend engineering.

The extension point is PrivateUse1, PyTorch's official way for new hardware to register as a device. TorchNeuron plugs into it, so model.to('neuron') behaves like model.to('cuda'), and torch.nn, torch.autocast, torch.distributed and torch.profiler all work as written. TorchTPU does the equivalent for TPUs, and device_map="tpu" is the whole change in Transformers.

THE THREE ANNOUNCEMENTS, READ AS ONE MOVE

TorchNeuron is Apache 2.0, public beta from October 20, at github.com/aws-neuron/torch-neuronx, on Trainium2 and Trainium3. Eager execution works for debugging, including an experimental adaptive eager mode, and torch.compile works for production. DDP, FSDP2, tensor and pipeline parallelism compose as written. In compiled mode, Dynamo captures an FX graph, AOTAutograd traces the backward pass, and the backend lowers through Torch-MLIR into StableHLO before the Neuron compiler emits a NEFF file.

Colin Brace, vice president of technology software at AWS Annapurna Labs, gave GeekWire the pitch in one line: "If you know PyTorch, then you know Trainium." He said more than 30 companies and internal Amazon teams used it in private beta, and AWS tests it nightly against more than 100,000 Hugging Face models. Deepgram says its own benchmarks showed Trainium processing about 60 percent more input audio seconds per dollar than its GPU baselines, which is a vendor claim from a named customer, not an independent benchmark.

TorchTPU is the same move for Google's chips. The paper is arXiv 2610.24161, 23 pages and 5 figures, led by Claudio Basile. The pitch is out-of-the-box model execution and TPU migration through three pieces: eager execution optimizations, torch.compile integration, and native hardware acceleration. The authors are explicit that the previous path, PyTorch/XLA, required intrusive source-code modifications, suffered severe compile-time latency, had no eager mode, and lagged on distributed primitives. That admission is why this matters more than a version bump.

The third move is PyTorch 2.15, the most instructive of the three because Apple is not selling you a cloud. FP8 arrives on MPS at one byte per value, half the storage of BF16, multiplied on the GPU through F.scaled_mm with tensorwise and rowwise scaling. The memory number is the headline. Decoding a video with Wan2.2's tiled VAE used to peak at 270 GiB of driver memory across 8,764 padding calls in a 28-tile decode. On Metal kernels it peaks at 8.108 GiB. Requirements are an Apple silicon Mac, macOS 15 or later, Python 3.11 or later.

Every vendor converged on PyTorch as the neutral surface, because that is the only place their customers already are.

THE THREE PLACES YOUR ONE-LINE PORT BREAKS

Here is the framework. A backend port is a testing project, not a config edit. Budget it like one.

Neon infographic titled The Porting Reality Check showing a PyTorch core powering three broken stations: an operator coverage panel with crossed-out math symbols, a numerical drift panel with a sharp leopard photo next to a corrupted one, and a performance gauge reading 10 tokens per second before and 1,000 tokens per second after, under Nvidia and AWS Trainium logos
The porting reality check: operator coverage, numerical drift, performance cliffs.
  1. Operator coverage. A backend implements a subset of the CUDA operator surface. Your model calls operators the backend has not implemented, or implements differently. Amazon published its own numbers. In its August 2026 upstream test run it produced about 154,000 test outcomes, of which roughly 39,000 were deliberate Neuron skips. About 22,000 of those skips were operators with no native Neuron lowering. The explicit not-supported list includes sparse tensors, NestedTensor, forward-mode autograd, dynamic and symbolic shapes, and arbitrary attention masks. Popular transformer shapes are the target. Your weird model is not. Run an operator census before the port, not after the first crash.

    The place this bites hardest is an agent loop. An autonomous agent does not run one fixed graph. It branches on tool results, varies sequence length with every appended observation, and changes control flow between turns, which is the definition of a dynamic graph. TorchNeuron's first release lists dynamic and symbolic shapes as explicitly unsupported, alongside arbitrary attention masks in native multi-head attention. That does not mean an agent cannot run on Trainium. It means the loop that retries a tool, rewrites a prompt mid-trajectory, or fans out to a subagent can force a recompile at the exact moment you wanted a fast path. Adaptive eager exists to absorb launch cost, not to absorb a new graph every turn. Before you port an agent runtime, trace one real trajectory and count how many distinct graph shapes it produces. That count is your compile budget, and it is the number an operator census will not give you.

  2. Numerical behavior. Different kernels produce different floating-point results, and the failures are silent. The case study is in PyTorch 2.15 itself. On 2.14, the Qwen-Image-2.1 VAE encoder silently corrupted images on MPS and broke image editing. Nobody got an exception. Measurement caught it: an encode and decode round trip matched CPU at 10.06 dB PSNR before the fix and 29.95 dB after. Ten decibels is not a rounding difference, it is a different image. The fix was in constant padding, which is a memory-layout change, which is exactly the kind of thing that hides under a passing test suite. Build golden-output tests on a fixed input set and run them on both backends.
  3. Performance cliffs. A port that runs is not a port that is worth paying for. TorchNeuron's own documentation shows the trap in eager mode. Executed directly, every operation compiles its own NEFF file, launches it, and moves intermediates through HBM. The fix is adaptive eager or torch.compile, and the fact that AWS had to ship a mode to hide the cost tells you what the naive path costs.

    TorchTPU has the same shape of problem in collectives. The paper keeps collective operations inside a single StableHLO module so the XLA compiler can overlap computation and communication, and it puts the penalty for the alternative at 30 to 40 percent end to end. Thirty percent is not a tuning issue. That is a different economics case than the one you modeled from list prices.

    Multi-agent swarms make the latency picture worse in a specific, measurable way. Every turn is two workloads. Prefill processes the whole context at once, tool output plus memory plus the system prompt, and it is the large parallel matmul. Decode emits one token at a time, and the Hugging Face 2.15 writeup states the mechanism plainly: during decode each new token passes through the model as a single row, so the big matrix multiplications become matrix-vector products. That is why 2.15 ships dedicated GEMV kernels and a native grouped matmul for MoE layers, and why a backend's prefill number tells you almost nothing about its agent latency. An agent that calls five tools before it answers spends most of its wall clock in repeated prefill over a growing context, with short decode bursts between calls. Benchmark one long generation and you will model the wrong workload. Benchmark a full swarm trajectory, tool calls and memory retrieval included, and the number you get is the one your users feel.

WHY THE 85 PERCENT NUMBER IS NOT A MOAT FOR NVIDIA

The conventional reading is that 85 percent PyTorch adoption protects the incumbent, because everyone writes for the layer above CUDA.

Argue it the other way.

PyTorch was Meta's project in 2016 and was handed to the Linux Foundation in 2022. The toolkit was never Nvidia's property, and its maintainers spent years making the APIs accelerator-agnostic. That work is exactly what PrivateUse1 is for, and both Amazon and Google build on it.

The ecosystem everyone builds on is the surface competitors can target, because the switching cost never lived in your model code. It lived in the backend layer, and three vendors attacked that layer in one week.

What remains for Nvidia is real. Capacity, the maturity of CUDA's kernel library, and a decade of debugging intuition that no new backend has. That is a smaller moat than ecosystem lock, and it is priced differently. When the lock was software, you paid a premium and called it a platform decision. When the lock is capacity, you are negotiating a commodity with a shortage attached.

WHAT THIS MEANS FOR YOUR NEXT CAPACITY CONTRACT

For the buyer, portability turns procurement from a bet into a negotiation. If your workload can move with a testing project instead of a rewrite, you can price Trainium and TPU against GPU racks and mean it. You do not have to move. You have to be able to.

For the architect, do not assume your training stack is portable because your inference demo is. Prefill and decode behave differently on different backends, which is the argument in "Prefill and Decode Are Two Different Machines. You Are Buying Them as One." Operator coverage gaps show up where your workload is unusual, and prefill is where unusual shapes live. "A Chip Company Now Owns the Model Library" and "The Model Wars Are Over. The Infrastructure War Just Started." make the same point. The layer that decides who wins is not the model.

WHAT TO DO TODAY

  1. Run an operator census on your production model and record every op it calls.
  2. Pick one non-Nvidia backend, Trainium, TPU, or MPS, and attempt the config-change port in a scratch environment. Timebox it to one week.
  3. Build golden-output tests with fixed inputs and compare outputs across backends with a fidelity metric. PSNR for images and video. Exact match plus tolerance for text.
  4. Rerun your real workload benchmark on both backends. A port that loses 30 percent throughput is a finding, not a failure.
  5. Write the port cost into your next capacity negotiation as a number. Portability you have not tested is portability you do not have.

THE UNCOMFORTABLE QUESTION

Nvidia's moat was never the chips. It was the fifteen years of backend engineering nobody wanted to redo. Three companies just started redoing it in public and gave the results away. If your answer to "why are we on Nvidia" is still "because everything else is too hard to port," when was the last time you actually tried?

Enjoyed this article?

☕ Buy Me a Coffee

Support PhantomByte and keep the content coming!

Build Real AI Infrastructure

PhantomByte teaches you to build real AI infrastructure yourself: local AI stacks, autonomous agents, multi-agent orchestration, web scraping, and custom tools. Step-by-step PDF tutorials you download, follow, and deploy. No subscriptions. No fluff. Just skills that ship.