Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aarch64] patch mkl-dnn to use 'march=armv8-a' as the default build #1554

Merged
merged 1 commit into from
Sep 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions mkldnn_fix/aarch64-fix-default-build-flags-to-armv8-a.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
cmake/platform.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmake/platform.cmake b/cmake/platform.cmake
index 8630460ce..602eafe8e 100644
--- a/cmake/platform.cmake
+++ b/cmake/platform.cmake
@@ -198,7 +198,7 @@ elseif(UNIX OR MINGW)
endif()
# For native compilation tune for the host processor
if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
- append(DEF_ARCH_OPT_FLAGS "-mcpu=native")
+ append(DEF_ARCH_OPT_FLAGS "-march=armv8-a")
endif()
elseif(DNNL_TARGET_ARCH STREQUAL "PPC64")
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -295,7 +295,7 @@ elseif(UNIX OR MINGW)
endif()
# For native compilation tune for the host processor
if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
- append(DEF_ARCH_OPT_FLAGS "-mcpu=native")
+ append(DEF_ARCH_OPT_FLAGS "-march=armv8-a")
endif()
elseif(DNNL_TARGET_ARCH STREQUAL "PPC64")
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
--
2.34.1