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
[HigherOrderOp] stop erroring out on non-Tensor returns #107461
Closed
Closed
Conversation
This file contains 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
If map or autograd.Function have an input that returns a non-Tensor, then the code just errors out. Instead of erroring out we should graph break by raising Unsupported so users aren't confused. The better thing to do is actually support non-Tensor returns but that requires more work. Test Plan: - new tests [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/107461
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 39b4100 with merge base 600f9ef (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
zou3519
added a commit
that referenced
this pull request
Aug 18, 2023
If map or autograd.Function have an input that returns a non-Tensor, then the code just errors out. Instead of erroring out we should graph break by raising Unsupported so users aren't confused. The better thing to do is actually support non-Tensor returns but that requires more work. Test Plan: - new tests ghstack-source-id: 94f9aaf32386f2bb7799e9950c715b7e90283ab4 Pull Request resolved: #107461
If map or autograd.Function have an input that returns a non-Tensor, then the code just errors out. Instead of erroring out we should graph break by raising Unsupported so users aren't confused. The better thing to do is actually support non-Tensor returns but that requires more work. Test Plan: - new tests cc voznesenskym penguinwu anijain2305 @EikanWang jgong5 @Guobing-Chen @XiaobingSuper zhuhaozhe blzheng @Xia-Weiwen wenzhe-nrv jiayisunx ipiszy chenyang78 aakhundov [ghstack-poisoned]
zou3519
requested review from
voznesenskym,
ydwu4,
anijain2305 and
kshitij12345
August 18, 2023 16:11
If map or autograd.Function have an input that returns a non-Tensor, then the code just errors out. Instead of erroring out we should graph break by raising Unsupported so users aren't confused. The better thing to do is actually support non-Tensor returns but that requires more work. Test Plan: - new tests cc voznesenskym penguinwu anijain2305 @EikanWang jgong5 @Guobing-Chen @XiaobingSuper zhuhaozhe blzheng @Xia-Weiwen wenzhe-nrv jiayisunx ipiszy chenyang78 aakhundov [ghstack-poisoned]
ydwu4
approved these changes
Aug 18, 2023
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.
Looks great!
pytorchmergebot
pushed a commit
that referenced
this pull request
Aug 21, 2023
I pulled a bunch of autograd.Function from test_autograd.py and added a smoke test for them. Ideally we would actually run test_autograd.py as a part of the Dynamo test suite, but we have excluded it due to there being too many errors and I don't have time to figure that out at the moment. Pull Request resolved: #107467 Approved by: https://github.com/ydwu4 ghstack dependencies: #107459, #107461
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:
If map or autograd.Function have an input that returns a non-Tensor,
then the code just errors out. Instead of erroring out we should graph
break by raising Unsupported so users aren't confused. The better thing
to do is actually support non-Tensor returns but that requires more
work.
Test Plan:
cc @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @aakhundov