mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-11-10 10:27:03 +00:00
This reverts commit 7c23f3f0d4.
This commit is contained in:
@@ -118,18 +118,18 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
|
|||||||
# so we check for them manually and enable them if available
|
# so we check for them manually and enable them if available
|
||||||
|
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND ${CMAKE_C_COMPILER} -march=native -E -v -
|
COMMAND ${CMAKE_C_COMPILER} -mcpu=native -E -v -
|
||||||
INPUT_FILE "/dev/null"
|
INPUT_FILE "/dev/null"
|
||||||
OUTPUT_QUIET
|
OUTPUT_QUIET
|
||||||
ERROR_VARIABLE ARM_MCPU
|
ERROR_VARIABLE ARM_MCPU
|
||||||
RESULT_VARIABLE ARM_MCPU_RESULT
|
RESULT_VARIABLE ARM_MCPU_RESULT
|
||||||
)
|
)
|
||||||
if (NOT 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()
|
endif()
|
||||||
if ("${ARM_MCPU_FLAG}" STREQUAL "")
|
if ("${ARM_MCPU_FLAG}" STREQUAL "")
|
||||||
set(ARM_MCPU_FLAG -march=native)
|
set(ARM_MCPU_FLAG -mcpu=native)
|
||||||
message(STATUS "ARM -mcpu not found, -march=native will be used")
|
message(STATUS "ARM -mcpu not found, -mcpu=native will be used")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(CheckCXXSourceRuns)
|
include(CheckCXXSourceRuns)
|
||||||
|
|||||||
Reference in New Issue
Block a user