Skip to content
  • Jonathan Peyton's avatar
    Hwloc refactoring patch · 202a24dd
    Jonathan Peyton authored
    These changes remove the hwloc_topology_ignore_type function which doesn't exist
    in the hwloc 2.0 API. In the existing code, the topology extracted from hwloc
    has the cache levels stripped out and then assumes the final stripped topology
    follows the typical three-level topology: packages -> cores -> HW threads.
    But the code is doing unclean manipulations to determine at what level those
    resources are located and also assumes too much about what hwloc is detecting
    (there could be intermediate levels in between socket and core for instance).
    This new way of extracting the topology doesn't strip out any hardware objects
    that hwloc detects. It does not assume the three level topology, and instead
    searches for the relevant three levels within the topology for each bit of
    information using hwloc interface functions. i.e., the three level topology
    subset that our affinity code is interested in is extracted from the hwloc
    topology tree directly.
    
    For example, the new __kmp_hwloc_get_nobjs_under_obj function gives the user the
    number of cores under a socket reliably without worrying if there are unexpected
    objects between the socket object and core object in the hwloc topology
    structure. Also, now that all topology information is kept, there are also
    possibilities of using the caches/numa nodes to determine more sophisticated
    affinity settings in the future.
    
    There is also some cleanup code added for the destruction of the
    __kmp_hwloc_topology object.
    
    Differential Revision: http://reviews.llvm.org/D21195
    
    llvm-svn: 272565
    202a24dd
Loading