[Mlir-commits] [mlir] [AMDGPU] Implement gpu.subgroup_reduce with DPP intrinsics on AMD GPUs (PR #133204)
Jakub Kuderski
llvmlistbot at llvm.org
Wed Apr 16 07:36:41 PDT 2025
================
@@ -372,6 +500,14 @@ void mlir::populateGpuBreakDownSubgroupReducePatterns(
patterns.add<ScalarizeSingleElementReduce>(patterns.getContext(), benefit);
}
+void mlir::populateGpuLowerSubgroupReduceToDPPPatterns(
+ RewritePatternSet &patterns, unsigned subgroupSize, amdgpu::Chipset chipset,
+ PatternBenefit benefit) {
+ patterns.add<ScalarSubgroupReduceToDPP>(patterns.getContext(), subgroupSize,
+ /*matchClustered=*/true, chipset,
+ benefit);
+}
+
----------------
kuhar wrote:
> IREE doesn't rely on these native SPIR-V ops
We'd want to use the clustered spirv ops in IREE (even if we don't do that today). Note that the amdgpu lowering doesn't go through spir-v though.
https://github.com/llvm/llvm-project/pull/133204
More information about the Mlir-commits
mailing list