[Mlir-commits] [mlir] [mlir][gpu] Pattern to promote `gpu.shuffle` to specialized AMDGPU ops (PR #137109)

Ivan Butygin llvmlistbot at llvm.org
Thu Apr 24 15:34:58 PDT 2025


Hardcode84 wrote:

> Why can't we emit gpu.subgroup_reduce instead of shuffle and use the lowering patterns from https://github.com/llvm/llvm-project/pull/133204 ? I'd like to understand why you are approaching it from the form that's already decomposed to shuffles.

We are decomposing reductions early in Wave so it's just a bunch of `gpu.shuffle xor` + `arith`.

And in general, `gpu.shuffle` is fundamental building block so it would be nice to have a good lowering for it.

I will probably add dpp support later, so the overall uplifting flow will be `shuffle` -> `swizzle` -> `dpp`

https://github.com/llvm/llvm-project/pull/137109


More information about the Mlir-commits mailing list