--- cmake/platform.cmake.orig 2021-12-07 19:00:25 UTC +++ cmake/platform.cmake @@ -175,7 +175,7 @@ elseif(UNIX OR MINGW) set(DEF_ARCH_OPT_FLAGS "-O3") endif() # 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") @@ -183,7 +183,7 @@ elseif(UNIX OR MINGW) set(DEF_ARCH_OPT_FLAGS "-O3") endif() # 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") @@ -191,10 +191,10 @@ elseif(UNIX OR MINGW) set(DEF_ARCH_OPT_FLAGS "-O3") endif() # 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") + elseif(FALSE AND DNNL_TARGET_ARCH STREQUAL "X64") set(DEF_ARCH_OPT_FLAGS "-msse4.1") endif() # Clang cannot vectorize some loops with #pragma omp simd and gets @@ -272,7 +272,7 @@ elseif(UNIX OR MINGW) set(DEF_ARCH_OPT_FLAGS "-O3") endif() # 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") @@ -281,7 +281,7 @@ elseif(UNIX OR MINGW) endif() # 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") @@ -290,7 +290,7 @@ elseif(UNIX OR MINGW) endif() # 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 "RV64")