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 3] Add ONNX registry tutorial #2562

Conversation

titaiwangms
Copy link
Contributor

@titaiwangms titaiwangms commented Sep 14, 2023

Follow up #2541, this PR adds step by step guide to demonstrate end to end solution of how to address unsupported ATen/ONNX operators issue. Please review the last commit.

cc @thiagocrepaldi @abock @justinchuby @BowenBao @wschin

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 14, 2023

🔗 Helpful Links

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

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

⏳ No Failures, 1 Pending

As of commit 020e25f with merge base 677c1b6 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@titaiwangms titaiwangms marked this pull request as ready for review September 14, 2023 22:54
Copy link
Contributor

@thiagocrepaldi thiagocrepaldi left a comment

Choose a reason for hiding this comment

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

Looking good. Will do a local build and see it end to end

beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
@titaiwangms titaiwangms force-pushed the titaiwang/add-onnx-registry-tutorial branch 2 times, most recently from f6dae32 to fc8262b Compare September 15, 2023 19:04
@svekars svekars added the 2.1 label Sep 18, 2023
@svekars svekars changed the base branch from main to 2.1-RC-TEST September 18, 2023 20:36
@titaiwangms titaiwangms force-pushed the titaiwang/add-onnx-registry-tutorial branch from fc8262b to 3a17a30 Compare September 20, 2023 19:14
Thiago Crepaldi added 2 commits September 20, 2023 15:35
This PR adds a `Backends` section to the left menu which initially will
initially contain a placeholder for the series of ONNX export tutorials
based on Torch Dynamo backend

A table of content tree page will have static URL
https://pytorch.org/tutorials/beginner/onnx/intro_onnx.html that will be
referenced on PyTorch user document for torch.onnx module
@titaiwangms titaiwangms force-pushed the titaiwang/add-onnx-registry-tutorial branch from 3a17a30 to 1ad7170 Compare September 20, 2023 19:49
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 few editorial suggestions. Also, I'm confused why there are files from other PRs in this PR.

beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
beginner_source/onnx/onnx_registry_tutorial.py Outdated Show resolved Hide resolved
#
#
######################################################################
# Further reading
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Further reading
# Conclusion

Please add an a description of what the user learned from this tutorial.

Copy link
Contributor Author

@titaiwangms titaiwangms Oct 2, 2023

Choose a reason for hiding this comment

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

Done. I added Conclusion above.

# ----------------------------------------------
#
# Now that we have our model saved in a file, we can visualize it with `Netron <https://github.com/lutzroeder/netron>`_.
# Netron can either be installed on macos, Linux or Windows computers, or run directly from the browser.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Netron can either be installed on macos, Linux or Windows computers, or run directly from the browser.
# Netron can either be installed on macOS, Linux or Windows computers, or run directly from the browser.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we add macOS into en-wordlist.txt?

@@ -132,6 +132,7 @@ Lipschitz
logits
Lua
Luong
macos
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
macos

This spelling is incorrect.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@titaiwangms titaiwangms Oct 2, 2023

Choose a reason for hiding this comment

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

I see. We should use macOS instead. I can update all usage in this PR.

Update advanced_source/super_resolution_with_onnxruntime.py

Small change to kick off the build

Update advanced_source/super_resolution_with_onnxruntime.py

Small fix, to kick off the build.

Update beginner_source/onnx/export_simple_model_to_onnx_tutorial.py

Small change

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/export_simple_model_to_onnx_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

Update beginner_source/onnx/onnx_registry_tutorial.py

Co-authored-by: Svetlana Karslioglu <[email protected]>

added comments
@titaiwangms titaiwangms force-pushed the titaiwang/add-onnx-registry-tutorial branch from 0bd4de9 to 020e25f Compare October 2, 2023 02:28
@titaiwangms
Copy link
Contributor Author

Thanks for the super detail review on this tutorial!

A few editorial suggestions. Also, I'm confused why there are files from other PRs in this PR.

To avoid merge conflicts with the previous two PRs (ONNX 1 and ONNX 2), this PR builds on top of them like ghstack. You can review the last commit.

@svekars svekars deleted the branch pytorch:2.1-RC-TEST October 2, 2023 19:54
@svekars svekars closed this Oct 2, 2023
@svekars
Copy link
Contributor

svekars commented Oct 2, 2023

I apologize for closing this. Can you please resubmit against main?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants