summaryrefslogtreecommitdiff
path: root/math/onednn/files/patch-cmake_platform.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'math/onednn/files/patch-cmake_platform.cmake')
-rw-r--r--math/onednn/files/patch-cmake_platform.cmake24
1 files changed, 22 insertions, 2 deletions
diff --git a/math/onednn/files/patch-cmake_platform.cmake b/math/onednn/files/patch-cmake_platform.cmake
index eb4bf3e72db7..ce18aaa0fa84 100644
--- a/math/onednn/files/patch-cmake_platform.cmake
+++ b/math/onednn/files/patch-cmake_platform.cmake
@@ -27,8 +27,28 @@
set(DEF_ARCH_OPT_FLAGS "-msse4.1")
endif()
# Clang cannot vectorize some loops with #pragma omp simd and gets
-@@ -203,7 +203,7 @@ elseif(UNIX OR MINGW)
- if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
+@@ -186,24 +186,24 @@ elseif(UNIX OR MINGW)
+ if(DNNL_TARGET_ARCH STREQUAL "AARCH64")
+ set(DEF_ARCH_OPT_FLAGS "-O3")
+ # For native compilation tune for the host processor
+- if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
++ if (FALSE AND CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
+ append(DEF_ARCH_OPT_FLAGS "-mcpu=native")
+ endif()
+ elseif(DNNL_TARGET_ARCH STREQUAL "PPC64")
+ set(DEF_ARCH_OPT_FLAGS "-O3")
+ # In GCC, -ftree-vectorize is turned on under -O3 since 2007.
+ # For native compilation tune for the host processor
+- if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
++ if (FALSE AND CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
+ append(DEF_ARCH_OPT_FLAGS "-mcpu=native")
+ endif()
+ elseif(DNNL_TARGET_ARCH STREQUAL "S390X")
+ set(DEF_ARCH_OPT_FLAGS "-O3")
+ # In GCC, -ftree-vectorize is turned on under -O3 since 2007.
+ # For native compilation tune for the host processor
+- if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
++ if (FALSE AND CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
append(DEF_ARCH_OPT_FLAGS "-march=native")
endif()
- elseif(DNNL_TARGET_ARCH STREQUAL "X64")