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

[GPU] Bail out in GPUReduceBankConflicts if we have collapse_shape user #18863

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

nirvedhmeshram
Copy link
Contributor

This is unsupported by upstream and can lead to a compiler error. llvm/llvm-project#112994

Progress towards: #18858

@nirvedhmeshram nirvedhmeshram changed the title [GPU] Bail out in GPUReduceBankConflicts Pass if we have collapse_shape users [GPU] Bail out in GPUReduceBankConflicts if we have collapse_shape user Oct 21, 2024
…pe users

Signed-off-by: Nirvedh <nirvedh@gmail.com>
Signed-off-by: Nirvedh <nirvedh@gmail.com>
Signed-off-by: Nirvedh <nirvedh@gmail.com>
Signed-off-by: Nirvedh <nirvedh@gmail.com>
Comment on lines +29 to +30
if (isa<ViewLikeOpInterface>(user)) {
for (auto u : user->getUsers()) {
Copy link
Contributor

@Max191 Max191 Oct 22, 2024

Choose a reason for hiding this comment

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

Should probably add arith::SelectOp to this too. And ops with a block that has an argument tied to this use should add the block arg users (I think we mainly need to worry about scf.for).

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 think both of these cases should be okay with the pass, as it will add a strided subview with the same shape as the pre padded alloc and replace the type in all the users, the problem with the collapse shape case is it does not support strides that dont add up to the shape.

If there is some IR case you are worried about, happy to add that as a test.

@Max191 Max191 self-requested a review October 24, 2024 21:09
@nirvedhmeshram nirvedhmeshram merged commit aef6e1f into iree-org:main Oct 24, 2024
36 checks passed
Eliasj42 pushed a commit that referenced this pull request Oct 31, 2024
…er (#18863)

This is unsupported by upstream and can lead to a compiler error.
llvm/llvm-project#112994

Progress towards: #18858

---------

Signed-off-by: Nirvedh <nirvedh@gmail.com>
Signed-off-by: Elias Joseph <eljoseph@amd.com>
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.

4 participants