8000 [LinalgExt] Canonicalize gather to an extract_slice by IanWood1 · Pull Request #20878 · iree-org/iree · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[LinalgExt] Canonicalize gather to an extract_slice #20878

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

Merged
merged 3 commits into from
May 21, 2025

Conversation

IanWood1
Copy link
Contributor
@IanWood1 IanWood1 commented May 21, 2025

Adds canonicalizer to iree_linalg_ext.gather to convert to a tensor.extract_slice when there is only a single contiguous slice gathered by the op (aka a single batch of indices).

Also, I had to fixup compiler/src/iree/compiler/DispatchCreation/test/pipeline_tests.mlir so that the gathers didn't get converted.

Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
IanWood1 added 2 commits May 21, 2025 12:47
Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
@IanWood1 IanWood1 requested a review from hanhanW May 21, 2025 19:52
@IanWood1 IanWood1 merged commit 6e1c8b8 into iree-org:main May 21, 2025
40 of 42 checks passed
ziereis pushed a commit to ziereis/iree that referenced this pull request May 22, 2025
Adds canonicalizer to `iree_linalg_ext.gather` to convert to a
`tensor.extract_slice` when there is only a single contiguous slice
gathered by the op (aka a single batch of indices).

Also, I had to fixup
`compiler/src/iree/compiler/DispatchCreation/test/pipeline_tests.mlir`
so that the gathers didn't get converted.

---------

Signed-off-by: Ian Wood <ianwood2024@u.northwestern.edu>
Signed-off-by: Thomas Ziereis <ziereis@roofline.ai>
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
0