Skip to content

Commit d4b1259

Browse files
committed
march -> mcpu, skip adding feature macros
ggml-ci
1 parent 0a4b79c commit d4b1259

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ggml/src/ggml-cpu/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
8888
endif()
8989

9090
if (GGML_NATIVE)
91-
list(APPEND ARCH_FLAGS -march=native)
91+
list(APPEND ARCH_FLAGS -mcpu=native)
9292

9393
set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
9494

95-
# -march=native does not always enable all the features in some compilers,
95+
# -mcpu=native does not always enable all the features in some compilers,
9696
# so we check for them manually and enable them if available
9797

9898
include(CheckCXXSourceRuns)
@@ -103,7 +103,6 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
103103
GGML_COMPILER_SUPPORT_DOTPROD)
104104
if (GGML_COMPILER_SUPPORT_DOTPROD)
105105
set(ARCH_FLAGS "${ARCH_FLAGS}+dotprod")
106-
list(APPEND ARCH_DEFINITIONS __ARM_FEATURE_DOTPROD)
107106
endif()
108107

109108
set(CMAKE_REQUIRED_FLAGS "${ARCH_FLAGS}+i8mm")
@@ -112,7 +111,6 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
112111
GGML_COMPILER_SUPPORT_I8MM)
113112
if (GGML_COMPILER_SUPPORT_I8MM)
114113
set(ARCH_FLAGS "${ARCH_FLAGS}+i8mm")
115-
list(APPEND ARCH_DEFINITIONS __ARM_FEATURE_MATMUL_INT8)
116114
endif()
117115

118116
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})

0 commit comments

Comments
 (0)