-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Unify fetching RRefs #57859
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
Unify fetching RRefs #57859
Conversation
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 9564774 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
| Job | Step | Action |
|---|---|---|
| Run tests | 🔁 rerun |
This comment was automatically generated by Dr. CI (expand for details).
Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group.
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
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.
LGTM!
| return future->then( | ||
| [autogradContextId = rrefBackwardReq.getAutogradContextId(), | ||
| retainGraph = rrefBackwardReq.retainGraph()](JitFuture& future) { | ||
| // Run backward (TODO: make this async?). |
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.
@pritamdamania87 is there any concern for making distributed backward async?
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.
I think this should be fine as long as it is still sync from the user point of view. Although, I think this is an old comment from a previous PR and not from this PR right?
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/) [ghstack-poisoned]
Pull Request resolved: pytorch#57859 Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps. ghstack-source-id: 129567050 Differential Revision: [D28286172](https://our.internmc.facebook.com/intern/diff/D28286172/)
|
This pull request has been merged in 797dff5. |
Stack from ghstack:
Just like with assigning OwnerRRefs, we can also deduplicate the code paths for fetching their values. In fact this was duplicated three times, with different ways of post-processing the value (once for JIT, once for Python, once for autograd). Thanks to future, we can have that logic once, and then connect it to different follow-up steps.
Differential Revision: D28286172