-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Enable type promotions in slice_scatter (pytorch#147842) #151911
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
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151911
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7942737 with merge base 3aeeb77 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@pytorchbot label "topic: not user facing" |
@@ -2908,6 +2908,7 @@ def inner_fn(idx): | |||
|
|||
@register_lowering(aten.slice_scatter, type_promotion_kind=None) | |||
def slice_scatter(x, src, dim=0, start=None, end=None, step=1): | |||
src = to_dtype(src, x.get_dtype()) |
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.
I was hoping setting type_promotion_kind can do the right type promotion, but looks like we do need to convert to x's dtype here to match the eager behavior. cc @eellison
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.
I also tried using type_promotion_kind but found it didn’t match eager behavior. Is there anything else you need from me on this item? I also expect this type promotion issue may affect the other scatter functions as well.
@desertfire |
Fixes #147842
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov