Skip to content

Commit 3eafc2e

Browse files
committed
disable all features for mac arm cpu-ref backend [no ci]
This commit disables all the cpu features for the mac arm cpu-ref backend. Before this commit the features reported when running a cpu variant test were the following: ```console CPU-ref features: NEON = 1 ARM_FMA = 1 FP16_VA = 1 DOTPROD = 1 ``` After this commit the features are: ```console CPU-ref features: (no features reported) ```
1 parent 243f460 commit 3eafc2e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ggml/src/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,20 @@ if (GGML_CPU_REF_BACKEND)
398398
set(GGML_OPENMP OFF)
399399
set(GGML_CPU_KLEIDIAI OFF)
400400
set(GGML_CPU_REPACK OFF)
401+
set(GGML_ACCELERATE OFF)
402+
401403
ggml_add_cpu_backend_variant(ref)
404+
405+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "arm|aarch64|ARM|AARCH64")
406+
target_compile_options(ggml-cpu-ref PRIVATE
407+
-U__ARM_NEON
408+
-U__ARM_FEATURE_FMA
409+
-U__ARM_FEATURE_FP16_VECTOR_ARITHMETIC
410+
-U__ARM_FEATURE_DOTPROD
411+
-U__ARM_FEATURE_MATMUL_INT8
412+
-U__ARM_FEATURE_SVE
413+
)
414+
endif()
402415
target_compile_definitions(ggml PRIVATE GGML_USE_CPU_REF)
403416
endif()
404417

0 commit comments

Comments
 (0)