[clang] [Clang][NVPTX] fix `no member named 'this_cluster'` (PR #187039)
Durgadoss R via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 30 03:17:21 PDT 2026
================
@@ -184,6 +184,12 @@ void NVPTXTargetInfo::getTargetDefines(const LangOptions &Opts,
unsigned ArchID = CudaArchToID(GPU);
Builder.defineMacro("__CUDA_ARCH__", llvm::Twine(ArchID));
+ // Per
+ // https://docs.nvidia.com/cuda/cuda-programming-guide/04-special-topics/cooperative-groups.html#id4
+ // clusters are only available with >=9.0 compute capability
+ if (ArchID >= 900)
+ Builder.defineMacro("_CG_CLUSTER_INTRINSICS_AVAILABLE");
----------------
durga4github wrote:
ok, I see the macro in `.../details/info.h` and the change LGTM.
Please wait for @Artem-B 's review before landing.
https://github.com/llvm/llvm-project/pull/187039
More information about the cfe-commits
mailing list