[Openmp-commits] [clang] [llvm] [mlir] [openmp] [OpenMP][offload] Cross-team reductions with variable number of teams (PR #195102)

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Thu May 7 17:46:53 PDT 2026


================
@@ -6872,6 +6872,18 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
         CmdArgs.push_back("-fno-openmp-extensions");
       Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_cuda_number_of_sm_EQ);
       Args.AddAllArgs(CmdArgs, options::OPT_fopenmp_cuda_blocks_per_sm_EQ);
+      // '-fopenmp-cuda-teams-reduction-recs-num=' is deprecated and has no
+      // effect: the teams reduction buffer is sized at kernel launch by the
+      // offload plugin to match the actual number of teams. Honoring a
+      // smaller user-supplied value would silently truncate the buffer for
+      // larger launches. The flag is still parsed (and forwarded to cc1)
----------------
jdoerfert wrote:

> and forwarded to cc1

Why is that (necessary)? Can't we ignore it here with the warning?

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


More information about the Openmp-commits mailing list