-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Improve custom ops aliasing error message #134688
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
Fixes #134278 Test Plan: - tested locally [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/134688
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 761163f with merge base 55236d0 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
f"the offending output tensors (e.g. output.clone()) " | ||
f"or refactor your code. " | ||
f"Offending op: {self._name} (with implementation in {module})" | ||
f"{self._name} (with implementation in {module}): " |
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.
Aren't inplace ops expected to return the input that they modify inplace as-is though to be able to support autograd?
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.
We don't support that in the compile path or the torch.library.custom_op API. We can extend support for it in the future but users have been fine without it.
f"or refactor your code. " | ||
f"Offending op: {self._name} (with implementation in {module})" | ||
f"{self._name} (with implementation in {module}): " | ||
f"The output of this custom operator (1) must not " |
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.
f"The output of this custom operator (1) must not " | |
f"The output of a custom operator (1) must not " |
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.
Using "this" was intentional, people had trouble interpreting it
Fixes #134278 Test Plan: - tested locally [ghstack-poisoned]
@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 |
Fixes pytorch#134278 Test Plan: - tested locally Pull Request resolved: pytorch#134688 Approved by: https://github.com/yushangdi ghstack dependencies: pytorch#134466, pytorch#134490, pytorch#134491, pytorch#134690, pytorch#134692
Stack from ghstack (oldest at bottom):
Fixes #134278
Test Plan: