Skip to content

Commit 882563c

Browse files
committed
core: don't guess memory tiers if memattrs are disabled
Signed-off-by: Brice Goglin <[email protected]>
1 parent fed97f6 commit 882563c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

hwloc/topology.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4291,7 +4291,8 @@ hwloc_topology_load (struct hwloc_topology *topology)
42914291
/* Same for memattrs */
42924292
hwloc_internal_memattrs_need_refresh(topology);
42934293
hwloc_internal_memattrs_refresh(topology);
4294-
hwloc_internal_memattrs_guess_memory_tiers(topology);
4294+
if (!(topology->flags & HWLOC_TOPOLOGY_FLAG_NO_MEMATTRS))
4295+
hwloc_internal_memattrs_guess_memory_tiers(topology);
42954296

42964297
topology->state &= ~HWLOC_TOPOLOGY_STATE_IS_LOADING;
42974298
topology->state |= HWLOC_TOPOLOGY_STATE_IS_LOADED;

include/hwloc.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,9 +2347,10 @@ enum hwloc_topology_flags_e {
23472347
*/
23482348
HWLOC_TOPOLOGY_FLAG_NO_DISTANCES = (1UL<<7),
23492349

2350-
/** \brief Ignore memory attributes.
2350+
/** \brief Ignore memory attributes and tiers.
23512351
*
2352-
* Ignore memory attribues from the operating systems (and from XML).
2352+
* Ignore memory attribues from the operating systems (and from XML)
2353+
* Hence also do not try to build memory tiers.
23532354
*/
23542355
HWLOC_TOPOLOGY_FLAG_NO_MEMATTRS = (1UL<<8),
23552356

0 commit comments

Comments
 (0)