-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Consider storage_changed for assigning alias_of_input in aot_autograd when computing differentiable outputs that alias each other #115315
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
Conversation
… when computing differentiable outputs that alias each other [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/115315
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 3b51fe6 with merge base f591933 ( UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…ot_autograd when computing differentiable outputs that alias each other" [ghstack-poisoned]
intermediate_base_tensor_id_to_output_idx: Dict[int, int] = {} | ||
intermediate_bases: List[torch.Tensor] = [] | ||
# Why do we care if storage changed? | ||
# There is a really care class of situations, which basically only happen with something |
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.
care -> rare
# | ||
# return out | ||
# | ||
# Esentially, what his code does is calls set_() with no_grad() - aka, our simulation |
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.
Mention the unsafe autograd preservation too, and that this is what fsdp does lol
# | ||
# return out | ||
# | ||
# Esentially, what his code does is calls set_() with no_grad() - aka, our simulation |
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.
his -> this
o needs a type check |
…ot_autograd when computing differentiable outputs that alias each other" [ghstack-poisoned]
…ot_autograd when computing differentiable outputs that alias each other" [ghstack-poisoned]
…ot_autograd when computing differentiable outputs that alias each other" cc penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx chenyang78 aakhundov kadeng [ghstack-poisoned]
Merge failedReason: This PR needs a If not, please add the To add a label, you can comment to pytorchbot, for example For more information, see Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…ok on flat_param (#112184) Pull Request resolved: #112184 Approved by: https://github.com/albanD ghstack dependencies: #115315
Support for something we need for both FSDP and optimizers. For sourced args that are not inputs (params, etc) - we use the dynamic_getattr flow on tensors. This soundly handles the storage and registration and guarding downstream of tensor_wrap for the grad values. For non sourced (true intermediates), we only support None (the idea being that if we have a true intermediate in the graph with grad, we are already doing something weird). Pull Request resolved: #115898 Approved by: https://github.com/bdhirsh ghstack dependencies: #115315, #112184
… when computing differentiable outputs that alias each other (pytorch#115315) Pull Request resolved: pytorch#115315 Approved by: https://github.com/bdhirsh
…ok on flat_param (pytorch#112184) Pull Request resolved: pytorch#112184 Approved by: https://github.com/albanD ghstack dependencies: pytorch#115315
Support for something we need for both FSDP and optimizers. For sourced args that are not inputs (params, etc) - we use the dynamic_getattr flow on tensors. This soundly handles the storage and registration and guarding downstream of tensor_wrap for the grad values. For non sourced (true intermediates), we only support None (the idea being that if we have a true intermediate in the graph with grad, we are already doing something weird). Pull Request resolved: pytorch#115898 Approved by: https://github.com/bdhirsh ghstack dependencies: pytorch#115315, pytorch#112184
… when computing differentiable outputs that alias each other (pytorch#115315) Pull Request resolved: pytorch#115315 Approved by: https://github.com/bdhirsh
…ok on flat_param (pytorch#112184) Pull Request resolved: pytorch#112184 Approved by: https://github.com/albanD ghstack dependencies: pytorch#115315
Support for something we need for both FSDP and optimizers. For sourced args that are not inputs (params, etc) - we use the dynamic_getattr flow on tensors. This soundly handles the storage and registration and guarding downstream of tensor_wrap for the grad values. For non sourced (true intermediates), we only support None (the idea being that if we have a true intermediate in the graph with grad, we are already doing something weird). Pull Request resolved: pytorch#115898 Approved by: https://github.com/bdhirsh ghstack dependencies: pytorch#115315, pytorch#112184
Stack from ghstack (oldest at bottom):
cc @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @aakhundov @kadeng