File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1521,10 +1521,15 @@ hwloc__group_memory_tiers(hwloc_topology_t topology,
1521
1521
}
1522
1522
}
1523
1523
1524
- /* Sort nodes.
1525
- * We could also sort by the existing subtype.
1526
- * KNL is the only case where subtypes are set in backends, but we set memattrs as well there.
1527
- * Also HWLOC_MEMTIERS_REFRESH would be a special value to ignore existing subtypes.
1524
+ /* Sort nodes by tier type and bandwidth.
1525
+ *
1526
+ * We could also use the existing subtype but it's not clear it'd be better.
1527
+ * For NVIDIA GPU, "GPUMemory" is set in the Linux backend, and used above to set tier type anyway.
1528
+ * For KNL, the Linux backend sets subtypes and memattrs, sorting by memattrs already works fine.
1529
+ * Existing subtypes could have been imported from XML, usually mostly OK except maybe SPM (fallback for I don't know)?
1530
+ * An envvar (or HWLOC_MEMTIERS_REFRESH special value?) could be passed to ignore existing subtypes,
1531
+ * but "GPUMemory" wouldn't be available anymore, we'd have to use something else like "PCIBusId",
1532
+ * but that one might not always be specific to GPU-backed NUMA nodes?
1528
1533
*/
1529
1534
hwloc_debug ("Sorting memory node infos...\n" );
1530
1535
qsort (nodeinfos , n , sizeof (* nodeinfos ), compare_node_infos_by_type_and_bw );
You can’t perform that action at this time.
0 commit comments