TorchNeuron: Native PyTorch on AWS Trainium Is in Public Beta
Hi, it's Shii-chan!
AWS What's NewThis one is exciting: you can run your PyTorch code on AWS chips as-is!
What was announced?
AWS What's New announced the public beta of TorchNeuron, an open source native PyTorch backend for AWS Trainium.
Trainium is a portfolio of AI chips designed to deliver high performance and cost efficiency for deep learning training and inference workloads.
Why it matters
TorchNeuron lets AI scientists and researchers experiment and build models with PyTorch natively on Trainium. Using a custom chip with the code style you already know is a nice thing.
What changes
Developers can enable their PyTorch code on Trainium by switching to .to('neuron').
Full PyTorch compatibility is maintained, including:
- Eager execution
torch.compile- Standard PyTorch APIs
Dive Deep
- It integrates with Neuron Kernel Interface (NKI) for custom operators and performance optimization on Trainium hardware
- It's open source, available from the TorchNeuron GitHub repo
- It targets Amazon EC2 Trainium2 and Trainium3 instances
It's a public beta for now. See the AWS Neuron page for more.
Wrap-up
- TorchNeuron is an open source native PyTorch backend for Trainium, in public beta
- Switch to
.to('neuron')to run PyTorch code - Compatible with eager execution,
torch.compile, and standard APIs - NKI enables custom operators and optimization
- Targets Trainium2 and Trainium3 EC2 instances
This is for anyone who wants to try Trainium with PyTorch!