[Mlir-commits] [mlir] [mlir][gpu] Add 'cluster_size' attribute to gpu.subgroup_reduce (PR #104851)
Kunwar Grover
llvmlistbot at llvm.org
Tue Aug 20 04:54:33 PDT 2024
================
@@ -620,6 +620,14 @@ LogicalResult gpu::SubgroupReduceOp::verify() {
<< "` reduction operation is not compatible with type "
<< getType();
}
+
+ if (auto clusterSize = getClusterSize()) {
+ uint32_t size = *clusterSize;
+ if (size < 1 || !llvm::isPowerOf2_32(size)) {
----------------
Groverkss wrote:
unsigned also covers positive, although im not sure if using unsigned to indicate positiveness is preferred.
https://github.com/llvm/llvm-project/pull/104851
More information about the Mlir-commits
mailing list