@@ -76,6 +76,7 @@ struct cpuid_x86 {
76
76
bool AVX512_VNNI (void ) { return f_7_ecx[11 ]; }
77
77
bool AVX512_FP16 (void ) { return f_7_edx[23 ]; }
78
78
bool AVX512_BF16 (void ) { return f_7_1_eax[5 ]; }
79
+ bool AVX_VNNI (void ) { return f_7_1_eax[4 ]; }
79
80
80
81
bool AMX_TILE (void ) { return f_7_edx[24 ]; }
81
82
bool AMX_INT8 (void ) { return f_7_edx[25 ]; }
@@ -265,6 +266,7 @@ static int ggml_backend_cpu_x86_score() {
265
266
if (ggml_cpu_has_ssse3 () && !is.SSSE3 ()) { return 0 ; }
266
267
if (ggml_cpu_has_sse3 () && !is.SSE3 ()) { return 0 ; }
267
268
if (ggml_cpu_has_avx () && !is.AVX ()) { return 0 ; }
269
+ if (ggml_cpu_has_avx_vnni () && !is.AVX_VNNI ()) { return 0 ; }
268
270
if (ggml_cpu_has_avx2 () && !is.AVX2 ()) { return 0 ; }
269
271
if (ggml_cpu_has_avx512 () && !is.AVX512F ()) { return 0 ; }
270
272
if (ggml_cpu_has_avx512_vbmi () && !is.AVX512_VBMI ()) { return 0 ; }
@@ -279,8 +281,8 @@ static int ggml_backend_cpu_x86_score() {
279
281
score += ggml_cpu_has_f16c () * 1 <<1 ;
280
282
score += ggml_cpu_has_ssse3 () * 1 <<2 ;
281
283
score += ggml_cpu_has_sse3 () * 1 <<3 ;
282
- // score += ggml_cpu_has_avx_vnni () * 1<<4; // not used
283
284
score += ggml_cpu_has_avx () * 1 <<5 ;
285
+ score += ggml_cpu_has_avx_vnni () * 1 <<4 ;
284
286
score += ggml_cpu_has_avx2 () * 1 <<6 ;
285
287
score += ggml_cpu_has_avx512 () * 1 <<7 ;
286
288
// score += ggml_cpu_has_avx512_vbmi() * 1<<8; // not used
0 commit comments