[Openmp-commits] [clang] [llvm] [mlir] [openmp] [OpenMP][offload] Cross-team reductions with variable number of teams (PR #195102)
Robert Imschweiler via Openmp-commits
openmp-commits at lists.llvm.org
Fri May 8 05:37:39 PDT 2026
================
@@ -788,8 +788,12 @@ void CGOpenMPRuntimeGPU::emitKernelDeinit(CodeGenFunction &CGF,
? 0
: DL.getTypeAllocSize(LLVMReductionsBufferTy).getFixedValue();
CGBuilderTy &Bld = CGF.Builder;
+ // The teams-reduction buffer is sized at kernel launch by the offload
+ // plugin to match the actual number of teams, so we always pass 0 as the
+ // buffer length (signal for dynamic sizing) regardless of any value
+ // supplied via the deprecated -fopenmp-cuda-teams-reduction-recs-num flag.
OMPBuilder.createTargetDeinit(Bld, ReductionDataSize,
- C.getLangOpts().OpenMPCUDAReductionBufNum);
+ /*TeamsReductionBufferLength=*/0);
----------------
ro-i wrote:
you're right, thanks
https://github.com/llvm/llvm-project/pull/195102
More information about the Openmp-commits
mailing list