[Openmp-commits] [PATCH] D156727: [OpenMP] Let primary thread gather topology info for each worker thread
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jul 31 12:04:11 PDT 2023
jlpeyton created this revision.
jlpeyton added reviewers: tlwilmar, hbae, Nawrin.
jlpeyton added a project: OpenMP.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a project: All.
jlpeyton requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: jplehr, sstefan1.
This change has the primary thread create each thread's initial mask
and topology information so it is available immediately after
forking. The setting of mask/topology information is decoupled from the
actual binding. Also add this setting of topology information inside the
`__kmp_partition_places` mechanism for `OMP_PLACES`+`OMP_PROC_BIND`.
Without this, there could be a timing window after the primary
thread signals the workers to fork where worker threads have not yet
established their affinity mask or topology information.
Each worker thread will then bind to the location the primary thread sets.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156727
Files:
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_affinity.cpp
openmp/runtime/src/kmp_barrier.cpp
openmp/runtime/src/kmp_runtime.cpp
openmp/runtime/src/z_Linux_util.cpp
openmp/runtime/src/z_Windows_NT_util.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156727.545755.patch
Type: text/x-patch
Size: 11947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230731/ba28bb4a/attachment.bin>
More information about the Openmp-commits
mailing list