Teach the HWLOC topology method how to detect Atom and Core
types so hybrid CPUs are properly detected and represented when using
the HWLOC topology method.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
hwloc_cpukinds_get_nr() and friends were introduced in hwloc v2.4, so these changes implicitly bumps the hwloc version requirement to 2.4.
I suspect this was not intended.
For example, RHEL8 provides hwloc 2.2 and requiring hwloc not provided by the distro is imho not desirable (for example, conflicts can occur when building a binary linked to a library (such as MPI) that depends on the distro hwloc.
The attached patch #ifdef protects (most) the changes when building against hwloc < 2.4.
Did you have any chance to review this issue (e.g. this changes implicitly requires hwloc ?= 2.4)?
openmp/runtime/src/kmp_affinity.cpp:1611 has to be guarded by version check as well.
I've made https://reviews.llvm.org/D142152 which combines @ggouaillardet 's patch with this other necessary HWLOC_API_VERSION guard.