This patch implements teams affinity on the host.
The default is spread. A user can specify either spread, close, or
primary using KMP_TEAMS_PROC_BIND environment variable. Unlike
OMP_PROC_BIND, KMP_TEAMS_PROC_BIND is only a single value and is not a
list of values. The values follow the same semantics under the OpenMP
specification for parallel regions except T is the number of teams in
a league instead of the number of threads in a parallel region.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
openmp/runtime/src/kmp_runtime.cpp | ||
---|---|---|
5075 | The variable really controls both doing the place partition and setting the proc bind var. | |
5263–5264 | So for this example, I can't wrap the setting of t_proc_bind under the KMP_AFFINITY_SUPPORTED macro since it needs to be updated even on platforms with no affinity. At least, that's how it is currently setup (t_proc_bind isn't guarded by KMP_AFFINITY_SUPPORTED even before this patch). |
Can all of the code using do_place_partition go inside KMP_AFFINITY_SUPPORTED?