[Mlir-commits] [mlir] [MLIR][NVVM] Add "blocksareclusters" kernel attribute support (PR #154519)

Guray Ozen llvmlistbot at llvm.org
Wed Aug 20 09:12:56 PDT 2025


================
@@ -1922,6 +1922,15 @@ LogicalResult NVVMDialect::verifyOperationAttribute(Operation *op,
       return op->emitError()
              << "'" << attrName << "' attribute must be integer constant";
   }
+  // blocksareclusters must be used along with reqntid and cluster_dim
+  if (attrName == NVVMDialect::getBlocksAreClustersAttrName()) {
+    if (!op->hasAttr(NVVMDialect::getReqntidAttrName()) ||
+        !op->hasAttr(NVVMDialect::getClusterDimAttrName()))
+      return op->emitError()
+             << "'" << attrName << "' attribute must be used along with "
+             << "'" << NVVMDialect::getReqntidAttrName() << "' and "
+             << "'" << NVVMDialect::getClusterDimAttrName() << "'";
----------------
grypp wrote:

this is not a strict policy, but imo it's better to have {} when we've multiline code

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


More information about the Mlir-commits mailing list