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

Rajat Bajpai via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 14 23:13:41 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:

It spits out irrelevant line info; anyway, I've addressed it in the latest revision.

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


More information about the llvm-commits mailing list