[OpenMP] Fix HWLOC topology detection for 2.0.x
authorPeyton, Jonathan L <jonathan.l.peyton@intel.com>
Mon, 11 Jan 2021 21:17:02 +0000 (15:17 -0600)
committerPeyton, Jonathan L <jonathan.l.peyton@intel.com>
Wed, 27 Jan 2021 20:27:23 +0000 (14:27 -0600)
commit9f87c6b47df977f2be04535021e7fd08abb9376d
tree2644ec79f44bb1a3753fd1effda67205e5b694ab
parentff038b316d771f97e66f7882bcaef70cc6a74dc5
[OpenMP] Fix HWLOC topology detection for 2.0.x

HWLOC 2.0 has numa nodes as separate children and are not in the main
parent/child topology tree anymore.  This change takes this into
account.  The main topology detection loop in the create_hwloc_map()
routine starts at a hardware thread within the initial affinity mask and
goes up the topology tree setting the socket/core/thread labels
correctly.

This change also introduces some of the more generic changes that the
future kmp_topology_t structure will take advantage of including a
generic ratio & count array (finding all ratios of topology layers like
threads/core cores/socket and finding all counts of each topology
layer), generic radix1 reduction step, generic uniformity check, and
generic printing of topology (en_US.txt)

Differential Revision: https://reviews.llvm.org/D95156
openmp/runtime/src/i18n/en_US.txt
openmp/runtime/src/kmp.h
openmp/runtime/src/kmp_affinity.cpp