[Openmp-commits] [llvm] [openmp] [OpenMPOpt] Ask the runtime how many of a block's threads can be workers (PR #217080)
Larry Meadows via Openmp-commits
openmp-commits at lists.llvm.org
Wed Aug 19 03:10:54 PDT 2026
================
@@ -217,6 +217,9 @@ uint32_t __kmpc_get_hardware_num_threads_in_block();
/// External interface to get the warp size.
uint32_t __kmpc_get_warp_size();
+/// External interface to get the maximum number of threads in a team.
+uint32_t __kmpc_get_max_team_threads();
+
----------------
lfmeadow wrote:
Agreed, "the maximum number of threads in a team" reads as the block size and it is not that. Reworded to say the threads hosting the main thread are unavailable to the team in generic mode, and that how many those are is the runtime's to decide — which is the reason the compiler asks instead of subtracting a warp for itself.
https://github.com/llvm/llvm-project/pull/217080
More information about the Openmp-commits
mailing list