[Mlir-commits] [mlir] [mlir][gpu] Add 'cluster_size' attribute to gpu.subgroup_reduce (PR #104851)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Aug 19 13:59:59 PDT 2024
================
@@ -1222,12 +1232,32 @@ def GPU_SubgroupReduceOp : GPU_Op<"subgroup_reduce", [SameOperandsAndResultType]
let arguments = (ins
AnyIntegerOrFloatOr1DVector:$value,
GPU_AllReduceOperationAttr:$op,
- UnitAttr:$uniform
+ UnitAttr:$uniform,
+ OptionalAttr<I32Attr>:$cluster_size
);
let results = (outs AnyIntegerOrFloatOr1DVector:$result);
+ let builders = [
+ OpBuilder<(ins "Value":$value,
+ "::mlir::gpu::AllReduceOperation":$op,
+ "bool":$uniform), [{
+ build($_builder, $_state, value, op, uniform, /* cluster_size: */ nullptr);
----------------
kuhar wrote:
to follow the llvm coding style:
```suggestion
build($_builder, $_state, value, op, uniform, /*cluster_size=*/ nullptr);
```
https://github.com/llvm/llvm-project/pull/104851
More information about the Mlir-commits
mailing list