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] Update API to torch.onnx.export(..., dynamo=True) #3223

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

titaiwangms
Copy link
Contributor

@titaiwangms titaiwangms commented Jan 8, 2025

Fixes #3200

Description

Checklist

  • The issue that is being fixed is referred in the description (see above "Fixes #ISSUE_NUMBER")
  • Only one issue is addressed in this pull request
  • Labels from the issue that this PR is fixing are added to this pull request
  • No unnecessary issues are included into this pull request.

TODO: The registry doc also needs an update.

cc @justinchuby

Copy link

pytorch-bot bot commented Jan 8, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3223

Note: Links to docs will display an error until the docs builds have been completed.

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@titaiwangms titaiwangms marked this pull request as ready for review January 24, 2025 22:01
@titaiwangms
Copy link
Contributor Author

@svekars PTAL

@justinchuby
Copy link

I don’t see print outputs here either https://pytorch.org/tutorials/beginner/onnx/intro_onnx.html. Do we need to do something to enable it? (If there is an option)

@justinchuby
Copy link

@titaiwangms
Copy link
Contributor Author

They have prints here https://pytorch.org/tutorials/intermediate/torchrec_intro_tutorial.html

Yeah, I don't know. I tried a local build, and registry has the print out while control flow does not.
Screenshot 2025-01-24 185152
Screenshot 2025-01-24 185218

@titaiwangms titaiwangms force-pushed the titaiwang/dynamo_true_api branch from a983c2a to e104e01 Compare January 27, 2025 21:04
@titaiwangms titaiwangms changed the base branch from 2.6-RC-TEST to main January 27, 2025 21:06
@titaiwangms
Copy link
Contributor Author

We need to be merging these updates to main (we are pulling 2.6 on main branch now). Can you please rebase

Done

Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of editorial suggestions.

# * Overriding the implementation of an existing PyTorch operator
# * Using custom ONNX operators
# * Supporting a custom PyTorch operator
#
Copy link
Contributor

@svekars svekars Jan 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a Prerequisites section, it could look like:

Suggested change
#
#
# Prerequisites
# ~~~~~~~~~~~~~~~
#
# Before starting this tutorial, make sure you have completed the following prerequisites:
#
# * Completed the `ONNX Script tutorial <https://github.com/microsoft/onnxscript/blob/main/docs/tutorial/index.md>`_
# * You have the target PyTorch operator
# * You are familiar with the implementation of the operator using `ONNX Script <https://github.com/microsoft/onnxscript>`__
#

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

# * Using custom ONNX operators
# * Supporting a custom PyTorch operator
#
# Overriding the implementation of an existing PyTorch operator
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a What you will learn section. Example:

In this tutorial, you will learn:

  • How to override or add support for PyTorch operators in ONNX.
  • How to integrate custom ONNX operators for specialized runtimes.
  • How to implement and translate custom PyTorch operators to ONNX.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@svekars svekars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove dot for consistency.

@titaiwangms
Copy link
Contributor Author

@svekars Should we skip link checker on this PR, since it's newly added page? Or is there anything I missed to enable the link?

@justinchuby
Copy link

@svekars bump

@svekars svekars added the skip-link-check Will allow you to skip linkcheck on a PR. Should only should be used when a link can't be fixed. label Feb 3, 2025
@svekars
Copy link
Contributor

svekars commented Feb 3, 2025

skip-linkcheck because the failing link will become live after PR is merged.

@titaiwangms
Copy link
Contributor Author

@svekars Sorry, could you approve the workflows again? I missed the misspelled words. Could you also point me to the local repro of misspelled word checks? Thank you!

@titaiwangms
Copy link
Contributor Author

titaiwangms commented Feb 19, 2025

TODO: Update registry tutorial with triton support: pytorch/pytorch#147374

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed skip-link-check Will allow you to skip linkcheck on a PR. Should only should be used when a link can't be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ONNX] Add torch.onnx.export(..., dynamo=True) tutorials
8 participants