[Openmp-commits] [PATCH] D115664: [OpenMP][libomp] Fix compile errors with new KMP_HW_SUBSET changes
Sylvestre Ledru via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Dec 13 23:33:30 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9769340905d0: [OpenMP][libomp] Fix compile errors with new KMP_HW_SUBSET changes (authored by jlpeyton, committed by sylvestre.ledru).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115664/new/
https://reviews.llvm.org/D115664
Files:
openmp/runtime/src/kmp_affinity.cpp
openmp/runtime/src/kmp_settings.cpp
Index: openmp/runtime/src/kmp_settings.cpp
===================================================================
--- openmp/runtime/src/kmp_settings.cpp
+++ openmp/runtime/src/kmp_settings.cpp
@@ -4994,11 +4994,14 @@
if (attr_ptr) {
attr.clear();
// save the attribute
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64
if (__kmp_str_match("intel_core", -1, attr_ptr + 1)) {
attr.set_core_type(KMP_HW_CORE_TYPE_CORE);
} else if (__kmp_str_match("intel_atom", -1, attr_ptr + 1)) {
attr.set_core_type(KMP_HW_CORE_TYPE_ATOM);
- } else if (__kmp_str_match("eff", 3, attr_ptr + 1)) {
+ }
+#endif
+ if (__kmp_str_match("eff", 3, attr_ptr + 1)) {
const char *number = attr_ptr + 1;
// skip the eff[iciency] token
while (isalpha(*number))
Index: openmp/runtime/src/kmp_affinity.cpp
===================================================================
--- openmp/runtime/src/kmp_affinity.cpp
+++ openmp/runtime/src/kmp_affinity.cpp
@@ -1104,10 +1104,12 @@
struct core_type_indexer {
int operator()(const kmp_hw_thread_t &t) const {
switch (t.attrs.get_core_type()) {
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64
case KMP_HW_CORE_TYPE_ATOM:
return 1;
case KMP_HW_CORE_TYPE_CORE:
return 2;
+#endif
case KMP_HW_CORE_TYPE_UNKNOWN:
return 0;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115664.394154.patch
Type: text/x-patch
Size: 1394 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211214/c8608ba5/attachment.bin>
More information about the Openmp-commits
mailing list