]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
Revert "ggml-cpu: detect correct cpu flags for arm64 (llama/16229) (#16239)" (llama...
authorAdrien Gallouët <redacted>
Fri, 7 Nov 2025 16:34:05 +0000 (17:34 +0100)
committerGeorgi Gerganov <redacted>
Sun, 9 Nov 2025 16:30:22 +0000 (18:30 +0200)
This reverts commit 7c23f3f0d4b9f5d6ea140756eb694b562d5acebb.

src/ggml-cpu/CMakeLists.txt

index 485227d24db0551d830203ee6a3ee80995989bd3..23ec8bb08a732840305ab068c5a69278c80d01fe 100644 (file)
@@ -118,18 +118,18 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
                 # so we check for them manually and enable them if available
 
                 execute_process(
-                    COMMAND ${CMAKE_C_COMPILER} -march=native -E -v -
+                    COMMAND ${CMAKE_C_COMPILER} -mcpu=native -E -v -
                     INPUT_FILE "/dev/null"
                     OUTPUT_QUIET
                     ERROR_VARIABLE ARM_MCPU
                     RESULT_VARIABLE ARM_MCPU_RESULT
                 )
                 if (NOT ARM_MCPU_RESULT)
-                    string(REGEX MATCH "-march=[^ ']+" ARM_MCPU_FLAG "${ARM_MCPU}")
+                    string(REGEX MATCH "-mcpu=[^ ']+" ARM_MCPU_FLAG "${ARM_MCPU}")
                 endif()
                 if ("${ARM_MCPU_FLAG}" STREQUAL "")
-                    set(ARM_MCPU_FLAG -march=native)
-                    message(STATUS "ARM -mcpu not found, -march=native will be used")
+                    set(ARM_MCPU_FLAG -mcpu=native)
+                    message(STATUS "ARM -mcpu not found, -mcpu=native will be used")
                 endif()
 
                 include(CheckCXXSourceRuns)