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

Rajat Bajpai llvmlistbot at llvm.org
Thu Aug 21 00:37:09 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() << "'";
----------------
rajatbajpai wrote:

I also prefer this approach, but in one of my earlier reviews, I was advised not to use curly braces, which is why I asked.

Addressed.

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


More information about the Mlir-commits mailing list