Skip to content

Commit ea848d0

Browse files
authored
[OpenMP] Sort topology after adding processor group layer. (#83943)
Various behavior around creating affinity masks and detecting uniform topology depends on the topology being sorted. resort topology after adding processor group layer to ensure that the updated topology reflects the newly added processor group info. Observed that the topology was not sorted correctly on high core count AMD Epyc Genoa (2 sockets, 96 cores, 2 threads) using NUMA (NPS 2+).
1 parent b49d741 commit ea848d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

openmp/runtime/src/kmp_affinity.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ void kmp_topology_t::_insert_windows_proc_groups() {
327327
KMP_CPU_FREE(mask);
328328
_insert_layer(KMP_HW_PROC_GROUP, ids);
329329
__kmp_free(ids);
330+
331+
// sort topology after adding proc groups
332+
__kmp_topology->sort_ids();
330333
}
331334
#endif
332335

0 commit comments

Comments
 (0)