This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Update HWLOC topology detection for 2.0.x
ClosedPublic

Authored by jlpeyton on Jan 21 2021, 11:22 AM.

Details

Summary

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 topology
manipulation changes 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)

The plan is to have all the topology methods to use the generic
topology manipulation methods in a future patch.

Diff Detail

Event Timeline

jlpeyton created this revision.Jan 21 2021, 11:22 AM
jlpeyton requested review of this revision.Jan 21 2021, 11:22 AM
This revision is now accepted and ready to land.Jan 26 2021, 7:24 AM
This revision was landed with ongoing or failed builds.Jan 27 2021, 12:28 PM
This revision was automatically updated to reflect the committed changes.