Skip to content

Fix inferDstEncoding for rank 1 reduction#9925

Merged
neildhar merged 1 commit into
mainfrom
neildhar/pr9924
Apr 6, 2026
Merged

Fix inferDstEncoding for rank 1 reduction#9925
neildhar merged 1 commit into
mainfrom
neildhar/pr9924

Conversation

@neildhar
Copy link
Copy Markdown
Collaborator

@neildhar neildhar commented Apr 4, 2026

inferDstEncoding currently tries to unconditionally build a sliced
encoding from the src encoding it is given. But this is incorrect if the
source is rank 1, since we can't take a slice of a rank 1 tensor.


Copy link
Copy Markdown
Contributor

@lezcano lezcano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sg, but do we really need two mlir tests?

@neildhar
Copy link
Copy Markdown
Collaborator Author

neildhar commented Apr 4, 2026

do we really need two mlir tests?

I think there's some value in guarding against the bug in both places I found it, in case the code is refactored in the future. I don't feel strongly though.

@neildhar neildhar marked this pull request as ready for review April 4, 2026 19:51
`inferDstEncoding` currently tries to unconditionally build a sliced
encoding from the src encoding it is given. But this is incorrect if the
source is rank 1, since we can't take a slice of a rank 1 tensor.
@neildhar neildhar merged commit 453d1c9 into main Apr 6, 2026
12 of 14 checks passed
@neildhar neildhar deleted the neildhar/pr9924 branch April 6, 2026 22:04
plognjen pushed a commit to plognjen/triton that referenced this pull request Apr 14, 2026
`inferDstEncoding` currently tries to unconditionally build a sliced
encoding from the src encoding it is given. But this is incorrect if the
source is rank 1, since we can't take a slice of a rank 1 tensor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants