8000 Enable type promotions in slice_scatter (pytorch#147842) by tommyadams5 · Pull Request #151911 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tommyadams5
Copy link
Contributor
@tommyadams5 tommyadams5 commented Apr 22, 2025

Copy link
pytorch-bot bot commented Apr 22, 2025

🔗 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 Failures

As of commit 7942737 with merge base 3aeeb77 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
linux-foundation-easycla bot commented Apr 22, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@tommyadams5
Copy link
Contributor Author

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Apr 22, 2025
@bdhirsh bdhirsh requested a review from desertfire April 22, 2025 23:39
@bdhirsh bdhirsh added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 22, 2025
@@ -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())
Copy link
Contributor

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

Copy link
Contributor Author

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.

@tommyadams5
Copy link
Contributor Author

@desertfire
Do you need anything else from me on this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: inductor open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[inductor] torch.slice_scatter throws AssertionError when meeting internal float32
4 participants
0