Skip to content

Commit

Permalink
[onert/ggml] Don't specify arch on armv7l linux build (#14436)
Browse files Browse the repository at this point in the history
It removes the specific arch on ggml cross armv7l linux build.
Previously, ggml specifies -mfpu=neon-fp-armv8, which may cause
illegal instruction signal during running ggml_quantize_row_q8_0,
especially compiled with gcc-13 -On, where n = 1,2,3 on odroid xu4.
(ARMv7 Cortex-A15).

ONE-DCO-1.0-Signed-off-by: Sanggyu Lee <[email protected]>
  • Loading branch information
glistening authored Dec 9, 2024
1 parent ab777f0 commit 9a1731b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions runtime/3rdparty/ggml/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,10 @@ if (CMAKE_OSX_ARCHITECTURES STREQUAL "arm64" OR
# Android armeabi-v7a
list(APPEND ARCH_FLAGS -mfpu=neon-vfpv4 -mno-unaligned-access -funsafe-math-optimizations)
else()
# Raspberry Pi 2
list(APPEND ARCH_FLAGS -mfpu=neon-fp-armv8 -mno-unaligned-access -funsafe-math-optimizations)
# [FIX] remove the assumption of RPI2 here
# That is, `-mfpu=neon-fp-armv8` is removed.
list(APPEND ARCH_FLAGS -mno-unaligned-access -funsafe-math-optimizations)
# end of [FIX]
endif()
endif()
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "armv8")
Expand Down

0 comments on commit 9a1731b

Please sign in to comment.