Add new hidden helper affinity via the environment variable,
KMP_HIDDEN_HELPER_AFFINITY, which allows users to assign thread
affinity to hidden helper threads using the same syntax as
KMP_AFFINITY. OMP_PLACES/OMP_PROC_BIND have no interaction with
KMP_HIDDEN_HELPER_AFFINITY.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LG, let's see if someone else wants to chime in, otherwise this can be merged. (@tianshilei1992)
Comment Actions
ping. This is the third patch set in a series of three to introduce hidden helper affinity.
Comment Actions
I'm seeing test failures on Gentoo due to this change (both on amd64 and i386):
FAIL: libomp :: env/kmp_aff_disable_hwloc.c (54 of 301) ******************** TEST 'libomp :: env/kmp_aff_disable_hwloc.c' FAILED ******************** Script: -- : 'RUN: at line 1'; /usr/lib/ccache/bin/x86_64-pc-linux-gnu-clang -fno-experimental-isel -fopenmp -I /tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/src -I /tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp/runtime/test -L /tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/src -fno-omit-frame-pointer -I /tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp/runtime/test/ompt /tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp/runtime/test/env/kmp_aff_disable_hwloc.c -o /tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/test/env/Output/kmp_aff_disable_hwloc.c.tmp -lm -latomic && env KMP_AFFINITY=disabled KMP_TOPOLOGY_METHOD=hwloc /tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/test/env/Output/kmp_aff_disable_hwloc.c.tmp -- Exit Code: -6 Command Output (stdout): -- $ ":" "RUN: at line 1" $ "/usr/lib/ccache/bin/x86_64-pc-linux-gnu-clang" "-fno-experimental-isel" "-fopenmp" "-I" "/tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/src" "-I" "/tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp/runtime/test" "-L" "/tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/src" "-fno-omit-frame-pointer" "-I" "/tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp/runtime/test/ompt" "/tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp/runtime/test/env/kmp_aff_disable_hwloc.c" "-o" "/tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/test/env/Output/kmp_aff_disable_hwloc.c.tmp" "-lm" "-latomic" $ "env" "KMP_AFFINITY=disabled" "KMP_TOPOLOGY_METHOD=hwloc" "/tmp/portage/sys-libs/libomp-16.0.0_pre20221029/work/openmp_build-abi_x86_64.amd64/runtime/test/env/Output/kmp_aff_disable_hwloc.c.tmp" # command stderr: OMP: Warning #264: KMP_AFFINITY: Ignoring hwloc mechanism. Assertion failure at kmp_settings.cpp(5926): affinity->type != affinity_default. OMP: Error #13: Assertion failure at kmp_settings.cpp(5926). OMP: Hint Please submit a bug report with this message, compile and run commands used, and machine configuration info including native compiler and operating system versions. Faster response will be obtained by including all program sources. For information on submitting this issue, please see https://bugs.llvm.org/. error: command failed with exit status: -6 -- ********************
If that's of any relevance, I'm testing in a systemd-nspawn container.