Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONNX] Use the dynamo=True option from PyTorch 2.5 #2026

Open
justinchuby opened this issue Sep 17, 2024 · 2 comments
Open

[ONNX] Use the dynamo=True option from PyTorch 2.5 #2026

justinchuby opened this issue Sep 17, 2024 · 2 comments
Labels
onnx Related to the ONNX export

Comments

@justinchuby
Copy link

justinchuby commented Sep 17, 2024

Feature request

PyTorch 2.5 introduces the torch.onnx.export(..., dynamo=True) option and an improved export logic for converting models to ONNX. We recommend optimum to leverage this feature.

Motivation

The torch.onnx.export(..., dynamo=True) logic leverages new model capturing mechanism offered by torch.export. It is how PyTorch will capture models moving forward. Additionally, we have better optimization and external data support built into this logic path.

This is a continuation of #1712

Your contribution

I can create a PR

@IlyasMoutawwakil
Copy link
Member

Hi ! that's super cool, so we won't need to call torch.onnx.dynamo_export(..) ? and how much are these two different ?

@justinchuby
Copy link
Author

Hi! The dynamo=True option in PyTorch 2.5 uses a new logic the leverages torch.export ExportedProgram and the ONNX IR for capturing graph and constructing ONNX models. It is more robust and produces more optimized graphs than the current dynamo_export. dynamo_export will be updated to use the same logic starting from PyTorch 2.6 (tentative).

@dacorvo dacorvo added the onnx Related to the ONNX export label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
onnx Related to the ONNX export
Projects
None yet
Development

No branches or pull requests

3 participants