Skip to content

Commit

Permalink
[cmake] set 'march=generic' as the default build flag for mkldnn on a…
Browse files Browse the repository at this point in the history
…arch64

This is to fix: pytorch#109312
and remove the dependencies on mkldnn cmake default definitions
  • Loading branch information
snadampal committed Nov 16, 2023
1 parent 1e260c8 commit 9093fc2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/Modules/FindMKLDNN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ IF(NOT MKLDNN_FOUND)
IF(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
IF(CPU_INTEL)
SET(DNNL_ARCH_OPT_FLAGS "-msse4" CACHE STRING "" FORCE)
ELSEIF(CPU_AARCH64)
SET(DNNL_ARCH_OPT_FLAGS "-mcpu=generic" CACHE STRING "" FORCE)
ENDIF()
ELSE()
SET(DNNL_ARCH_OPT_FLAGS "" CACHE STRING "" FORCE)
Expand Down

0 comments on commit 9093fc2

Please sign in to comment.