[llvm] [openmp] [OpenMPOpt] Ask the runtime how many of a block's threads can be workers (PR #221450)
Larry Meadows via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 11 12:45:59 PDT 2026
================
@@ -175,6 +175,12 @@ extern "C" {
[[gnu::noinline]] uint32_t __kmpc_get_warp_size() {
return mapping::getWarpSize();
}
+
+// The mode is a parameter because callers reach this before the barrier that
+// would make the shared IsSPMDMode visible to them.
+[[gnu::noinline]] uint32_t __kmpc_get_max_team_threads(int32_t IsSPMD) {
----------------
lfmeadow wrote:
OpenMPOpt emits calls to these when it builds the custom state machine, so they have to survive as named symbols: `__kmpc_get_hardware_thread_id_in_block`, `__kmpc_get_hardware_num_threads_in_block`, `__kmpc_get_warp_size`, and now `__kmpc_get_max_team_threads`.
https://github.com/llvm/llvm-project/pull/221450
More information about the llvm-commits
mailing list