-
Notifications
You must be signed in to change notification settings - Fork 22.2k
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
Make detach return an alias even under inference mode #59633
Conversation
Fixes #59614 This fix isn't 100% correct but it appears to stem the bleeding. A better fix would be understand how to detect when function implementations don't uphold required invariants, leading to refcount disaster. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 67e5ad9 (more details on the Dr. CI page):
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. |
Fixes #59614 This fix isn't 100% correct but it appears to stem the bleeding. A better fix would be understand how to detect when function implementations don't uphold required invariants, leading to refcount disaster. Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
this is BC-breaking, no? |
I guess only if AutoNonVariableType was on, which is rare. |
why isn't it correct? Btw does this work with sparse? I think it will, I just recall we didn't bind
is it actually not legal to return non-aliases? |
Yeah, this shouldn't actually be BC breaking, because prior to
I think that this specific change only improves correctness, but what I am currently missing is a good explanation of how all of these "autograd only" operations should operate when AutoNonVariableType is on. For example, we also make
Nope it doesn't.
The correctness conditions here are a little vague (e.g., because cc @robieta this is the same thing we are arguing about in #59389 |
blegh mobile is throwing a hissy fit. Gonna do this slightly differently |
Fixes #59614 This fix isn't 100% correct but it appears to stem the bleeding. A better fix would be understand how to detect when function implementations don't uphold required invariants, leading to refcount disaster. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D28962183](https://our.internmc.facebook.com/intern/diff/D28962183) [ghstack-poisoned]
Fixes #59614 This fix isn't 100% correct but it appears to stem the bleeding. A better fix would be understand how to detect when function implementations don't uphold required invariants, leading to refcount disaster. Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: 0a09b5a91ccc2900d23530ecc5b5f1a210d3ff36 Pull Request resolved: #59633
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: Pull Request resolved: pytorch#59633 Fixes pytorch#59614 This fix isn't 100% correct but it appears to stem the bleeding. A better fix would be understand how to detect when function implementations don't uphold required invariants, leading to refcount disaster. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: gchanan Differential Revision: D28962183 Pulled By: ezyang fbshipit-source-id: 6ec71994666289dadef47bac363e6902df90b094
Summary: Pull Request resolved: pytorch#59633 Fixes pytorch#59614 This fix isn't 100% correct but it appears to stem the bleeding. A better fix would be understand how to detect when function implementations don't uphold required invariants, leading to refcount disaster. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: gchanan Differential Revision: D28962183 Pulled By: ezyang fbshipit-source-id: 6ec71994666289dadef47bac363e6902df90b094
Summary: Pull Request resolved: #59633 Fixes #59614 This fix isn't 100% correct but it appears to stem the bleeding. A better fix would be understand how to detect when function implementations don't uphold required invariants, leading to refcount disaster. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: gchanan Differential Revision: D28962183 Pulled By: ezyang fbshipit-source-id: 6ec71994666289dadef47bac363e6902df90b094
Stack from ghstack:
Fixes #59614
This fix isn't 100% correct but it appears to stem the bleeding.
A better fix would be understand how to detect when function
implementations don't uphold required invariants, leading to
refcount disaster.
Signed-off-by: Edward Z. Yang ezyang@fb.com
Differential Revision: D28962183