[llvm] [NVPTX] Add support for "blocksareclusters" kernel attr (PR #152265)
Rajat Bajpai via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 14 02:33:27 PDT 2025
================
@@ -414,6 +414,17 @@ void NVPTXAsmPrinter::emitKernelFunctionDirectives(const Function &F,
// the reqntid directive, and set the unspecified ones to 1.
// If none of Reqntid* is specified, don't output reqntid directive.
const auto ReqNTID = getReqNTID(F);
+
+ const NVPTXTargetMachine &NTM = static_cast<const NVPTXTargetMachine &>(TM);
+ const auto *STI = static_cast<const NVPTXSubtarget *>(NTM.getSubtargetImpl());
+
+ const bool BlocksAreClusters = F.hasFnAttribute("nvvm.blocksareclusters");
+ if (BlocksAreClusters && STI->getSmVersion() >= 90) {
----------------
rajatbajpai wrote:
No, order doesn't matter. Moved.
https://github.com/llvm/llvm-project/pull/152265
More information about the llvm-commits
mailing list