mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
Fix xnnpack compile error on arm32 (#18291)
### Description <!-- Describe your changes. --> Use different march flag to workaround what appears to be a clang issue. See https://github.com/tensorflow/tensorflow/issues/59970 for links to various relevant pieces of info/discussions. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
parent
a46c79d211
commit
8d298f6f78
1 changed files with 13 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index dba9b4687..bcaa18ad7 100755
|
||||
index dba9b4687..a4345898d 100755
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -122,7 +122,7 @@ ENDIF()
|
||||
|
|
@ -25,3 +25,15 @@ index dba9b4687..bcaa18ad7 100755
|
|||
SET_TARGET_PROPERTIES(XNNPACK PROPERTIES C_EXTENSIONS YES)
|
||||
ENDIF()
|
||||
IF(NOT MSVC)
|
||||
@@ -543,8 +548,9 @@ ENDIF()
|
||||
IF(XNNPACK_TARGET_PROCESSOR STREQUAL "arm")
|
||||
SET_PROPERTY(SOURCE ${ALL_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -marm ")
|
||||
SET_PROPERTY(SOURCE ${PROD_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -marm ")
|
||||
- SET_PROPERTY(SOURCE ${ALL_ARMSIMD32_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -march=armv6 -mfpu=vfp -munaligned-access ")
|
||||
- SET_PROPERTY(SOURCE ${PROD_ARMSIMD32_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -march=armv6 -mfpu=vfp -munaligned-access ")
|
||||
+ # set this to armv7-a to workaround build issue. we don't target armv6 so it shouldn't matter
|
||||
+ SET_PROPERTY(SOURCE ${ALL_ARMSIMD32_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -march=armv7-a -mfpu=vfp -munaligned-access ")
|
||||
+ SET_PROPERTY(SOURCE ${PROD_ARMSIMD32_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -march=armv7-a -mfpu=vfp -munaligned-access ")
|
||||
SET_PROPERTY(SOURCE ${ALL_NEON_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -march=armv7-a -mfpu=neon ")
|
||||
SET_PROPERTY(SOURCE ${PROD_NEON_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -march=armv7-a -mfpu=neon ")
|
||||
SET_PROPERTY(SOURCE ${ALL_NEONFP16_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -march=armv7-a -mfpu=neon-fp16 ")
|
||||
|
|
|
|||
Loading…
Reference in a new issue