Skip to content

Commit d0fc085

Browse files
authored
[aarch64] patch mkl-dnn to use 'march=armv8-a' as the default build (#1554)
1 parent 8465dbe commit d0fc085

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
cmake/platform.cmake | 4 ++--
3+
1 file changed, 2 insertions(+), 2 deletions(-)
4+
5+
diff --git a/cmake/platform.cmake b/cmake/platform.cmake
6+
index 8630460ce..602eafe8e 100644
7+
--- a/cmake/platform.cmake
8+
+++ b/cmake/platform.cmake
9+
@@ -198,7 +198,7 @@ elseif(UNIX OR MINGW)
10+
endif()
11+
# For native compilation tune for the host processor
12+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
13+
- append(DEF_ARCH_OPT_FLAGS "-mcpu=native")
14+
+ append(DEF_ARCH_OPT_FLAGS "-march=armv8-a")
15+
endif()
16+
elseif(DNNL_TARGET_ARCH STREQUAL "PPC64")
17+
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
18+
@@ -295,7 +295,7 @@ elseif(UNIX OR MINGW)
19+
endif()
20+
# For native compilation tune for the host processor
21+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
22+
- append(DEF_ARCH_OPT_FLAGS "-mcpu=native")
23+
+ append(DEF_ARCH_OPT_FLAGS "-march=armv8-a")
24+
endif()
25+
elseif(DNNL_TARGET_ARCH STREQUAL "PPC64")
26+
if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
27+
--
28+
2.34.1
29+

0 commit comments

Comments
 (0)