[llvm] [NVPTX] Add support for "blocksareclusters" kernel attr (PR #152265)
Alex MacLean via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 09:36:05 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";
+ }
----------------
AlexMaclean wrote:
I suppose you could add `F.getSubprogram()` for the 3rd argument, which would cause it to spit out the line where the function starts if debug info is attached. Without debug info it's going to spit out "<unknown>:0:0" no matter what.
https://github.com/llvm/llvm-project/pull/152265
More information about the llvm-commits
mailing list