Skip to content

Conversation

@soulitzer
Copy link
Contributor

@soulitzer soulitzer commented Mar 15, 2023

Stack from ghstack (oldest at bottom):

Updates:

  • recommend user to use non-reentrant, mention that reentrant will be deprecated in the future
  • merges all the warnings into a single list of non-reentrant improvements over reentrant
  • adds an additional entry to the list about allowing backward inside checkpointed region

@pytorch-bot
Copy link

pytorch-bot bot commented Mar 15, 2023

🔗 Helpful Links

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

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

❌ 1 Failures

As of commit e36eb85:

NEW FAILURES - The following jobs have failed:

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

@soulitzer soulitzer requested a review from albanD March 15, 2023 17:38
@soulitzer soulitzer added release notes: autograd release notes category topic: docs topic category labels Mar 15, 2023
Updates:
- recommend user to use non-reentrant, mention that reentrant will be deprecated in the future
- merges all the warnings into a single list of non-reentrant improvements over reentrant
- adds an additional entry to the list about allowing backward inside checkpointed region



[ghstack-poisoned]
Updates:
- recommend user to use non-reentrant, mention that reentrant will be deprecated in the future
- merges all the warnings into a single list of non-reentrant improvements over reentrant
- adds an additional entry to the list about allowing backward inside checkpointed region



[ghstack-poisoned]
# 6. During recompute, we see that in the original graph, gx has already
# cleared x and y since backward is run at (3) without retain_graph=True
# We save x and w, however.
# 7. Continue with returning
Copy link
Contributor Author

Choose a reason for hiding this comment

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

purely cosmetic change

Updates:
- recommend user to use non-reentrant, mention that reentrant will be deprecated in the future
- merges all the warnings into a single list of non-reentrant improvements over reentrant
- adds an additional entry to the list about allowing backward inside checkpointed region



[ghstack-poisoned]
use ``use_reentrant=False`` (non-reentrant variant). If you have a use case
that requires the reentrant variant, please file an issue.
The non-reentrant variant offers several improvements over the reentrant
Copy link
Collaborator

Choose a reason for hiding this comment

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

This feel quite weird here tbh.
This is supposed to be the doc explaining how to use this function. Not a discussion on the evolution of things.
Also I think that for this part, saying that we recommend use_reentrant=False and punt the discussion on the tradeoff to a note here. Or even somewhere else.

I feel like this doc should be much much simpler now that we have a working impl. Not more complex!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated. Kept the note here for now, though we can definitely move elsewhere later.

I feel like the simplicity would come closer to when we deprecate reentrant. Right now I don't think we should change too much since reentrant is still the default?

Updates:
- recommend user to use non-reentrant, mention that reentrant will be deprecated in the future
- merges all the warnings into a single list of non-reentrant improvements over reentrant
- adds an additional entry to the list about allowing backward inside checkpointed region



[ghstack-poisoned]
Updates:
- recommend user to use non-reentrant, mention that reentrant will be deprecated in the future
- merges all the warnings into a single list of non-reentrant improvements over reentrant
- adds an additional entry to the list about allowing backward inside checkpointed region



[ghstack-poisoned]
@soulitzer soulitzer requested a review from albanD March 21, 2023 00:00
Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Thanks for the update. This looks good!

@soulitzer
Copy link
Contributor Author

@pytorchbot merge -f "Unrelated failures"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 23, 2023
Updates:
- ~recommend user to use non-reentrant, mention that reentrant will be deprecated in the future~
- merges all the warnings into a single list of non-reentrant improvements over reentrant
- adds an additional entry to the list about allowing backward inside checkpointed region

Pull Request resolved: pytorch/pytorch#96862
Approved by: https://github.com/albanD
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Mar 27, 2023
Updates:
- ~recommend user to use non-reentrant, mention that reentrant will be deprecated in the future~
- merges all the warnings into a single list of non-reentrant improvements over reentrant
- adds an additional entry to the list about allowing backward inside checkpointed region

Pull Request resolved: pytorch/pytorch#96862
Approved by: https://github.com/albanD
@facebook-github-bot facebook-github-bot deleted the gh/soulitzer/191/head branch June 8, 2023 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged release notes: autograd release notes category topic: docs topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants