Skip to content

Commit 9eb9a13

Browse files
authored
Revert "ggml-cpu: detect correct cpu flags for arm64 (#16229) (#16239)" (#17084)
This reverts commit 7c23f3f.
1 parent 7c23f3f commit 9eb9a13

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ggml/src/ggml-cpu/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,18 +118,18 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
118118
# so we check for them manually and enable them if available
119119

120120
execute_process(
121-
COMMAND ${CMAKE_C_COMPILER} -march=native -E -v -
121+
COMMAND ${CMAKE_C_COMPILER} -mcpu=native -E -v -
122122
INPUT_FILE "/dev/null"
123123
OUTPUT_QUIET
124124
ERROR_VARIABLE ARM_MCPU
125125
RESULT_VARIABLE ARM_MCPU_RESULT
126126
)
127127
if (NOT ARM_MCPU_RESULT)
128-
string(REGEX MATCH "-march=[^ ']+" ARM_MCPU_FLAG "${ARM_MCPU}")
128+
string(REGEX MATCH "-mcpu=[^ ']+" ARM_MCPU_FLAG "${ARM_MCPU}")
129129
endif()
130130
if ("${ARM_MCPU_FLAG}" STREQUAL "")
131-
set(ARM_MCPU_FLAG -march=native)
132-
message(STATUS "ARM -mcpu not found, -march=native will be used")
131+
set(ARM_MCPU_FLAG -mcpu=native)
132+
message(STATUS "ARM -mcpu not found, -mcpu=native will be used")
133133
endif()
134134

135135
include(CheckCXXSourceRuns)

0 commit comments

Comments
 (0)