File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,24 @@ function(ggml_add_cpu_backend_variant_impl tag_name)
114114 else ()
115115 if (GGML_NATIVE)
116116 list (APPEND ARCH_FLAGS -mcpu=native)
117+
118+ # Show enabled features
119+ execute_process (
120+ COMMAND ${CMAKE_C_COMPILER} ${ARCH_FLAGS} -dM -E -
121+ INPUT_FILE "/dev/null"
122+ OUTPUT_VARIABLE ARM_FEATURE
123+ RESULT_VARIABLE ARM_FEATURE_RESULT
124+ )
125+ if (ARM_FEATURE_RESULT)
126+ message (WARNING "Failed to get ARM features" )
127+ else ()
128+ foreach (feature DOTPROD SVE MATMUL_INT8 FMA FP16_VECTOR_ARITHMETIC)
129+ string (FIND "${ARM_FEATURE} " "__ARM_FEATURE_${feature} 1" feature_pos)
130+ if (NOT ${feature_pos} EQUAL -1)
131+ message (STATUS "ARM feature ${feature} enabled" )
132+ endif ()
133+ endforeach ()
134+ endif ()
117135 else ()
118136 check_cxx_compiler_flag(-mfp16-format=ieee COMPILER_SUPPORTS_FP16_FORMAT_I3E)
119137 if (NOT "${COMPILER_SUPPORTS_FP16_FORMAT_I3E} " STREQUAL "" )
You can’t perform that action at this time.
0 commit comments