Skip to content
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

[TKW] Optimize trivial gather offsets #291

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

Hardcode84
Copy link
Contributor

@Hardcode84 Hardcode84 commented Nov 22, 2024

Update gather/scatter offset generation to handle trivial contiguous offsets (i.e. [0,1,2,3]) and generate contiguous load/store instead.

@Hardcode84
Copy link
Contributor Author

@harsh-nod here is the patch to get rid of trivial gathers

@harsh-nod
Copy link
Contributor

@harsh-nod here is the patch to get rid of trivial gathers

Thanks

@Hardcode84 Hardcode84 changed the title [WIP] Optimize trivial gather offsets [TKW] Optimize trivial gather offsets Nov 25, 2024
@Hardcode84 Hardcode84 marked this pull request as ready for review November 25, 2024 16:08
Signed-off-by: Ivan Butygin <[email protected]>
Copy link
Contributor

@raikonenfnu raikonenfnu left a comment

Choose a reason for hiding this comment

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

Do we not have tests to showcase this?

@Hardcode84
Copy link
Contributor Author

Do we not have tests to showcase this?

Yeah, it's kind of hard to construct artificial example for it.

Copy link
Contributor

@raikonenfnu raikonenfnu left a comment

Choose a reason for hiding this comment

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

Overall change LGTM, did you try locally cherry-picking on top of Harsh's usecase/commit to see if it get rids of the issue he has? If yes, I think we can merge it. :)

@Hardcode84 Hardcode84 merged commit 99bc0a2 into iree-org:main Nov 26, 2024
8 checks passed
@Hardcode84 Hardcode84 deleted the gather-cont branch November 26, 2024 19:27
Hardcode84 added a commit to Hardcode84/iree-turbine that referenced this pull request Nov 26, 2024
Update gather/scatter offset generation to handle trivial contiguous
offsets (i.e. `[0,1,2,3]`) and generate contiguous load/store instead.

---------

Signed-off-by: Ivan Butygin <[email protected]>
Hardcode84 added a commit that referenced this pull request Nov 26, 2024
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.

3 participants