[Openmp-commits] [openmp] 7f3d9cc - [openmp][NFC] Cleanup: guard __kmp_mic_type by KMP_MIC_SUPPORTED macro.
via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jun 29 04:29:40 PDT 2020
Author: AndreyChurbanov
Date: 2020-06-29T14:14:56+03:00
New Revision: 7f3d9cc1c059688b70cb35e673100c9eeadc4c46
URL: https://github.com/llvm/llvm-project/commit/7f3d9cc1c059688b70cb35e673100c9eeadc4c46
DIFF: https://github.com/llvm/llvm-project/commit/7f3d9cc1c059688b70cb35e673100c9eeadc4c46.diff
LOG: [openmp][NFC] Cleanup: guard __kmp_mic_type by KMP_MIC_SUPPORTED macro.
Differential Revision: https://reviews.llvm.org/D82301
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 9690df53b77d..47e70477ced6 100644
--- a/openmp/runtime/src/kmp_affinity.cpp
+++ b/openmp/runtime/src/kmp_affinity.cpp
@@ -1968,7 +1968,8 @@ static void __kmp_dispatch_set_hierarchy_values() {
__kmp_hier_max_units[kmp_hier_layer_e::LAYER_THREAD + 1] =
nPackages * nCoresPerPkg * __kmp_nThreadsPerCore;
__kmp_hier_max_units[kmp_hier_layer_e::LAYER_L1 + 1] = __kmp_ncores;
-#if KMP_ARCH_X86_64 && (KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS)
+#if KMP_ARCH_X86_64 && (KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS) && \
+ KMP_MIC_SUPPORTED
if (__kmp_mic_type >= mic3)
__kmp_hier_max_units[kmp_hier_layer_e::LAYER_L2 + 1] = __kmp_ncores / 2;
else
@@ -1982,7 +1983,8 @@ static void __kmp_dispatch_set_hierarchy_values() {
__kmp_hier_threads_per[kmp_hier_layer_e::LAYER_THREAD + 1] = 1;
__kmp_hier_threads_per[kmp_hier_layer_e::LAYER_L1 + 1] =
__kmp_nThreadsPerCore;
-#if KMP_ARCH_X86_64 && (KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS)
+#if KMP_ARCH_X86_64 && (KMP_OS_LINUX || KMP_OS_FREEBSD || KMP_OS_WINDOWS) && \
+ KMP_MIC_SUPPORTED
if (__kmp_mic_type >= mic3)
__kmp_hier_threads_per[kmp_hier_layer_e::LAYER_L2 + 1] =
2 * __kmp_nThreadsPerCore;
More information about the Openmp-commits
mailing list