Skip to content

Commit 2c22d1f

Browse files
committedDec 23, 2024·
ggml : fix arm enabled features check
1 parent 14b699e commit 2c22d1f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed
 

‎ggml/src/ggml-cpu/CMakeLists.txt

+8-2
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,20 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
135135
endif()
136136

137137
# show enabled features
138+
if (CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
139+
set(FEAT_INPUT_FILE "NUL")
140+
else()
141+
set(FEAT_INPUT_FILE "/dev/null")
142+
endif()
143+
138144
execute_process(
139145
COMMAND ${CMAKE_C_COMPILER} ${ARCH_FLAGS} -dM -E -
140-
INPUT_FILE "/dev/null"
146+
INPUT_FILE ${FEAT_INPUT_FILE}
141147
OUTPUT_VARIABLE ARM_FEATURE
142148
RESULT_VARIABLE ARM_FEATURE_RESULT
143149
)
144150
if (ARM_FEATURE_RESULT)
145-
message(FATAL_ERROR "Failed to get ARM features")
151+
message(WARNING "Failed to get ARM features")
146152
else()
147153
foreach(feature DOTPROD SVE MATMUL_INT8 FMA FP16_VECTOR_ARITHMETIC)
148154
string(FIND "${ARM_FEATURE}" "__ARM_FEATURE_${feature} 1" feature_pos)

0 commit comments

Comments
 (0)