PyTorch code runs on Trainium with little or no change, as Amazon validates its new backend on 841 representative models
Amazon released TorchNeuron, an open-source backend that translates PyTorch code into operations executable on AWS Trainium, so PyTorch code already running on other accelerators runs on Trainium with minimal or no code changes. An optional adaptive eager mode groups operations into small graphs that are compiled and cached, approaching fully compiled performance while keeping eager mode's debugging experience. For evaluation, AI agents swept Hugging Face repositories to identify 841 representative models covering the range of architectures, and tens of thousands of tensor shapes were distilled for tuning and benchmarking.