Make proxy tensor uses modes correctly, not repeating code between the subclass and mode#81708
Closed
samdow wants to merge 5 commits intogh/samdow/13/basefrom
Closed
Make proxy tensor uses modes correctly, not repeating code between the subclass and mode#81708samdow wants to merge 5 commits intogh/samdow/13/basefrom
samdow wants to merge 5 commits intogh/samdow/13/basefrom
Conversation
…e subclass and mode [ghstack-poisoned]
Contributor
🔗 Helpful links
❌ 1 New FailuresAs of commit 0e5dbbb (more details on the Dr. CI page): Expand to see more
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages
|
… between the subclass and mode" [ghstack-poisoned]
… between the subclass and mode" [ghstack-poisoned]
… between the subclass and mode" After I wrote this mode, Ed and I talked about what the proper thing to do when a subclass and mode want to do basically the same thing during torch dispatch. We ended up deciding that the mode would lead and the subclass would just enable the mode and call the function again (since modes go first, when the python key is reenabled it will hit the mode and not infinite loop). This fixes ProxyTensor to follow this [ghstack-poisoned]
… between the subclass and mode" After I wrote this mode, Ed and I talked about what the proper thing to do when a subclass and mode want to do basically the same thing during torch dispatch. We ended up deciding that the mode would lead and the subclass would just enable the mode and call the function again (since modes go first, when the python key is reenabled it will hit the mode and not infinite loop). This fixes ProxyTensor to do this [ghstack-poisoned]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
After I wrote this mode, Ed and I talked about what the proper thing to do when a subclass and mode want to do basically the same thing during torch dispatch. We ended up deciding that the mode would lead and the subclass would just enable the mode and call the function again (since modes go first, when the python key is reenabled it will hit the mode and not infinite loop). This fixes ProxyTensor to do this