[Mlir-commits] [mlir] [AMDGPU] Implement gpu.subgroup_reduce with DPP intrinsics on AMD GPUs (PR #133204)

Krzysztof Drewniak llvmlistbot at llvm.org
Mon Apr 14 14:20:04 PDT 2025


================
@@ -370,25 +371,27 @@ Value createSubgroupDPPReduction(OpBuilder &b, Location loc, Value input,
                                  gpu::AllReduceOperation mode,
                                  const ClusterInfo &ci,
                                  amdgpu::Chipset chipset) {
-  Value result = input;
   Value dppResult;
+  Value result = input;
   const int allRows = 0xf;
   const int allBanks = 0xf;
   const bool boundCtrl = true;
+  Value lane31 = b.create<LLVM::ConstantOp>(loc, b.getI32Type(), 31);
----------------
krzysz00 wrote:

Don't create a `llvm.constant` here - make an `arith.constant` and let further lowerings handle it

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


More information about the Mlir-commits mailing list