[Openmp-commits] [PATCH] D109921: [OpenMP][host runtime] Add support for teams affinity
Jonathan Peyton via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Oct 14 08:50:59 PDT 2021
jlpeyton added inline comments.
================
Comment at: openmp/runtime/src/kmp_runtime.cpp:5075
int level = 0;
+ int do_place_partition = 1;
----------------
tlwilmar wrote:
> Can all of the code using do_place_partition go inside KMP_AFFINITY_SUPPORTED?
The variable really controls both doing the place partition and setting the proc bind var.
================
Comment at: openmp/runtime/src/kmp_runtime.cpp:5263
- KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind);
+ if (do_place_partition) {
+ KMP_CHECK_UPDATE(team->t.t_proc_bind, new_proc_bind);
----------------
tlwilmar wrote:
> For example, here. Can KMP_AFFINITY_SUPPORTED wrap the whole if statement?
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).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109921/new/
https://reviews.llvm.org/D109921
More information about the Openmp-commits
mailing list