-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[inductor] return constant shape for ops that do not return #163023
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/163023
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit bb028ba with merge base cfc539f ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
/easycla |
|
/easycla |
eellison
left a comment
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.
Returning None is more consistent with other handlers which return None from these ops, like
pytorch/torch/_inductor/dtype_propagation.py
Lines 235 to 237 in d4554bc
| @staticmethod | |
| def store_reduction(name: str, index, value: DTypeArg) -> None: | |
| return None |
() could also be conflated with a single-element tensor. Is there a reason we need to do this ?
|
There's code like CSEProxy where the return value of all the ops are wrapped in a TritonCSEVariable at pytorch/torch/_inductor/codegen/triton.py Lines 3656 to 3661 in d4554bc
Since there's no assignment for |
|
Can we update |
|
@eellison, sure, I'll update the |
Updated the DeviceAssert operation to match the behavior of Store, it will fixes the issue mentioned in [this PR](#163023) and updated testcases as Elias [suggested](#160677 (comment)). cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy chenyang78 kadeng muchulee8 amjames chauhang aakhundov coconutruben mlazos choijon5 [ghstack-poisoned]
Updated the DeviceAssert operation to match the behavior of Store, it will fixes the issue mentioned in [this PR](#163023) and updated testcases as Elias [suggested](#160677 (comment)). Pull Request resolved: #163696 Approved by: https://github.com/mlazos
|
Thanks @karthickai for your PR |
Updated the DeviceAssert operation to match the behavior of Store, it will fixes the issue mentioned in [this PR](#163023) and updated testcases as Elias [suggested](#160677 (comment)). Pull Request resolved: #163696 Approved by: https://github.com/mlazos
Stack from ghstack (oldest at bottom):
Returning None is bad because None means that we don't know the shape.
Returning () is a good choice as that shape broadcasts with any other
shape.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben