[Mlir-commits] [mlir] [mlir][gpu] Add 'cluster_size' attribute to gpu.subgroup_reduce (PR #104851)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Aug 19 14:19:14 PDT 2024
================
@@ -629,6 +637,10 @@ OpFoldResult gpu::SubgroupReduceOp::fold(FoldAdaptor /*adaptor*/) {
return getResult();
}
+ if (getClusterSize() == 1) {
+ return getValue();
+ }
----------------
kuhar wrote:
Wouldn't it be better to check for this before uniformity? This seems like a cheaper way of doing things because we won't ever have to fold twice.
https://github.com/llvm/llvm-project/pull/104851
More information about the Mlir-commits
mailing list