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

Add compiled autograd tutorial #3026

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

Conversation

xmfan
Copy link
Member

@xmfan xmfan commented Sep 3, 2024

Fixes #3034

Description

Add tutorial for a PyTorch 2.4 feature

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.

Copy link

pytorch-bot bot commented Sep 3, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 45acca1 with merge base 7490332 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@xmfan xmfan changed the title [WIP] Add compiled autograd tutorial Add compiled autograd tutorial Sep 4, 2024
@xmfan xmfan marked this pull request as ready for review September 4, 2024 20:01
@xmfan xmfan requested a review from svekars September 4, 2024 20:02
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.

Thank you for following the template - I really appreciate it! I added some editorial / formatting suggestions. Can you please take a look and let me know if you have any questions.

intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved

######################################################################
# Compiled Autograd addresses certain limitations of AOTAutograd
# ------------
Copy link
Contributor

Choose a reason for hiding this comment

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

should this be a title or just a paragraph?

Copy link
Member Author

Choose a reason for hiding this comment

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

paragraph to clarify that it's a new section after "Compiling the forward and backward pass using different flags"

intermediate_source/compiled_autograd_tutorial.py Outdated Show resolved Hide resolved
@svekars
Copy link
Contributor

svekars commented Sep 6, 2024

There is still some issue on line 54 that prevents the tutorial from building. Can you check?

@xmfan xmfan mentioned this pull request Sep 7, 2024
4 tasks
@svekars svekars added the 2.5 PR related to version 2.5 label Sep 9, 2024
* Added runtime overhead at the start of the backward for cache lookup
* More prone to recompiles and graph breaks in dynamo due to the larger capture

.. note:: Compiled Autograd is under active development and is not yet compatible with all existing PyTorch features. For the latest status on a particular feature, refer to `Compiled Autograd Landing Page <https://docs.google.com/document/d/11VucFBEewzqgkABIjebZIzMvrXr3BtcY1aGKpX61pJY>`_.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why it's called Landing Page. Should it be called a Compiled Autograd Roadmap? Also, it feels like it would be better to point to issues on github with a specific label, perhaps, or a Github Project even?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm expecting the content of this doc to change rapidly at the moment, so I'll keep it as a google doc for now. It's also something we did for dynamic shapes and custom operators.

The end goal once the development is more stable, is to move it into the docs

intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
intermediate_source/compiled_autograd_tutorial.rst Outdated Show resolved Hide resolved
@xmfan xmfan requested a review from svekars September 13, 2024 21:49
@svekars svekars added 2.5 PR related to version 2.5 and removed 2.5 PR related to version 2.5 labels Sep 16, 2024
@svekars svekars added the 2.5 PR related to version 2.5 label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.5 PR related to version 2.5 cla signed new tutorial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

💡 [REQUEST] - Compiled Autograd Tutorial
3 participants