-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
A recipe for showcasing torch.export flow for 4 models, with unique challenges and solutions #3180
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/tutorials/3180
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 71c468f with merge base f7d06b6 (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
Co-authored-by: Svetlana Karslioglu <svekars@meta.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the efforts, it looks awesome. Left some comments.
|
||
TORCH_LOGS="graph_breaks" python <file_name>.py | ||
|
||
You will need to modify your program to get rid of graph breaks. Once resolved, you are ready to export the model. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an alternative of fixing all the graph breaks, which is export with strict=False
and strict=False
will become the default setting soon cc @avikchaudhuri. So it may worth mentioning this up front (I see the non-strict example below but just feel it worth emphasizing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed offline that will be addressing this in a different tutorial in H1
Co-authored-by: Angela Yi <angelayi@meta.com>
Co-authored-by: Angela Yi <angelayi@meta.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting cleanup
Fixes #3174
Description
The gaming community cares about certain classes of models like pose estimation, instance segmentation, video classification. When we try to export OSS implementations of these models, we run into unique challenges with torch.export
Currently, we have tutorials showing usage of export and talking about the core export-related concepts to keep in mind with simple examples. We also have ExportDB which has information on unsupported constructs with simple examples. However, practically, when running export on many models, its not very clear how does once go about addressing the issues.
This tutorial aims to do the reverse. Pick 4 models which are popular, try to export them, show the errors we run into and how do we solve them. The problems being solved are generic enough to be applicable to a range of models.
Checklist
cc @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @ydwu4