[Openmp-commits] [llvm] [openmp] [OpenMP][offload] Size the grid of cross-team reductions by their size (PR #234190)

Robert Imschweiler via Openmp-commits openmp-commits at lists.llvm.org
Thu Oct 29 09:08:54 PDT 2026


================
@@ -852,6 +852,65 @@ getDefaultNumBlocksGenericSPMD(const DeviceGeometryPropsTy &Props) {
   return Props.NumComputeUnits * OMPX_GenericSPMDTeamsPerCU.get();
 }
 
+/// Threshold for the reduction data size (in bytes) above which a cross-team
+/// reduction classifies as "large".
+static constexpr uint32_t LargeTeamsReductionBytes = 32;
----------------
ro-i wrote:

I got this number empirically, by benchmarking lots of reductions on different GPUs. But yeah, it's totally possible that I found out about this hardware property this way :D 

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


More information about the Openmp-commits mailing list