ggml-cpu: fix nc aligment in tinyBLAS_PPC_Q0 (#32659)

Fixes https://github.com/ggml-org/llama.cpp/issues/31680

The matmul_tiled() implementation in tinyBLAS_Q0_PPC requires nc to be a multiple of 8 to perform matrix multiplication correctly.

The previous alignment logic contained a special case for n == 4, which allowed n_aligned to be 4. Consequently, the tiled path could be selected with nc = 4, violating the kernel's tile-width requirement.

This caused incorrect matrix multiplication results, observed as garbled inference output when running  Flint Q4_K_M and Gemma 3 27B Instruct.
This commit is contained in:
shalinib-ibm authored and GitHub committed 2026-11-21 12:58:49 +02:00
1 parent 1fdda89a4d
commit 93cb37ea7b
1 file changed
-2
-2
View File
@@ -2981,8 +2981,6 @@ class tinyBLAS_Q0_PPC {
int64_t n_aligned = 0;
if (n % n_chunk == 0) {
n_aligned = n;
} else if (n == 4) {
n_aligned = 4;
} else if (n < n_chunk) {
n_aligned = (n / 8) * 8;
} else {