[Openmp-commits] [openmp] ea848d0 - [OpenMP] Sort topology after adding processor group layer. (#83943)
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Mar 13 14:22:26 PDT 2024
Author: MessyHack
Date: 2024-03-13T16:22:23-05:00
New Revision: ea848d0a6d5c17af3eb1a4e39dc712606ac684f6
URL: https://github.com/llvm/llvm-project/commit/ea848d0a6d5c17af3eb1a4e39dc712606ac684f6
DIFF: https://github.com/llvm/llvm-project/commit/ea848d0a6d5c17af3eb1a4e39dc712606ac684f6.diff
LOG: [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+).
Added:
Modified:
openmp/runtime/src/kmp_affinity.cpp
Removed:
################################################################################
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp
index c3ee4de75a237a..048bd174fc95a2 100644
--- a/openmp/runtime/src/kmp_affinity.cpp
+++ b/openmp/runtime/src/kmp_affinity.cpp
@@ -327,6 +327,9 @@ void kmp_topology_t::_insert_windows_proc_groups() {
KMP_CPU_FREE(mask);
_insert_layer(KMP_HW_PROC_GROUP, ids);
__kmp_free(ids);
+
+ // sort topology after adding proc groups
+ __kmp_topology->sort_ids();
}
#endif
More information about the Openmp-commits
mailing list