What's New in Torch.onnx
summary
New exporter path uses dynamo=True with torch.export/ExportedProgram to capture functional FX graphs, producing ONNX IR models that share tensors with the PyTorch state and serialize via onnx_program.save for memory-mapped inference. It supports dynamic shapes, control flow via torch.cond/torch.while, and native onnx attention operator (opset 23+) and rotary/arm norms. Tools include torch.onnx.verification for numeric diagnosis and torch.onnx.ops to inject custom ONNX ops when needed.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:42What is ONNX and Torch.onnx
- 1:47New ONNX exporter features
- 3:55Control flow in PyTorch 2
- 4:36Native ONNX operators
- 5:40Custom operator support
- 6:24Export return values and optimizations
- 7:50Validation tools
- 8:54Demo: Exporting Gemma 3
- 10:39ONNX export tips
related talks
10mLightning Talk: Streamlining Model Export with the New ONNX Exporter
05mPyTorch ONNX Export Support
06mTorchVision
45mLeverage Power of Machine Learning with ONNX
10mPyTorch 2.x: What’s coming up next for export-path
30mThe Evolution of ONNX: Driving Interoperability in AI...
33mWhat on earth is ONNX and ONNXRUNTIME
51mMaking neural networks run in browser with ONNX
