[llvm] [NVPTX] Add support for "blocksareclusters" kernel attr (PR #152265)

Rajat Bajpai via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 01:06:50 PDT 2025


================
@@ -452,6 +456,13 @@ void NVPTXAsmPrinter::emitKernelFunctionDirectives(const Function &F,
                "should be 0 as well");
       }
     }
+
+    if (BlocksAreClusters && STI->getPTXVersion() >= 90) {
+      assert(!(ReqNTID.empty() || getClusterDim(F).empty()) &&
+             "blocksareclusters requires reqntid and cluster_dim");
+      O << ".blocksareclusters\n";
+    }
----------------
rajatbajpai wrote:

Yes, added.

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


More information about the llvm-commits mailing list