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

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 6 00:48:54 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
index 096f94922..385bf334b 100644
--- a/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
@@ -418,8 +418,7 @@ void NVPTXAsmPrinter::emitKernelFunctionDirectives(const Function &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");
+  const bool BlocksAreClusters = F.hasFnAttribute("nvvm.blocksareclusters");
   if (BlocksAreClusters && STI->getSmVersion() >= 90) {
     if (ReqNTID.empty() || getClusterDim(F).empty())
       report_fatal_error("blocksareclusters requires reqntid and cluster_dim");

``````````

</details>


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


More information about the llvm-commits mailing list