Skip to content

Commit 0b45665

Browse files
committed
Fixed missing guards when selecting optimal repack type for Q4_K
Signed-off-by: Alberto Cabrera <[email protected]>
1 parent c14e3e4 commit 0b45665

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ggml/src/ggml-cpu/repack.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1846,8 +1846,11 @@ static const ggml::cpu::tensor_traits * ggml_repack_get_optimal_repack_type(cons
18461846
if (cur->ne[1] % 8 == 0) {
18471847
return &q4_K_8x8_q8_K;
18481848
}
1849-
} else if (ggml_cpu_has_neon() && ggml_cpu_has_matmul_int8()) {
1850-
return &q4_K_8x8_q8_K;
1849+
}
1850+
if (ggml_cpu_has_neon() && ggml_cpu_has_matmul_int8() && ggml_cpu_has_dotprod()) {
1851+
if (cur->ne[1] % 8 == 0) {
1852+
return &q4_K_8x8_q8_K;
1853+
}
18511854
}
18521855
} else if (cur->type == GGML_TYPE_Q2_K) {
18531856
if (ggml_cpu_has_avx512()) {

0 commit comments

Comments
 (0)