Fix issues with scalar version

This commit is contained in:
Srihari-mcw 2025-08-12 22:14:16 +05:30 committed by Manogna-Sree
parent 5c851ca7bd
commit be80640fea
1 changed files with 3 additions and 0 deletions

View File

@ -659,6 +659,9 @@ void ggml_gemv_q6_K_8x8_q8_K_generic(int n, float * GGML_RESTRICT s, size_t bs,
sumi = 0;
int offset = ((k / 2) % 2) + j * 2;
for (int i = 0; i < blocklen; ++i) {
const int hbits_index = k * ncols_interleaved * blocklen + j * blocklen + i;
const int lbits_index = (hbits_index / 32) * 64 + (hbits_index % 32);
int8_t v0 = (int8_t)((b_ptr[l].qh[hbits_index] & 3) << 4) | (b_ptr[l].ql[lbits_index] & 0xF) - 32;
int8_t v1 = (int8_t)(((b_ptr[l].qh[hbits_index] >> 2 ) & 3) << 4) | (b_ptr[l].ql[lbits_index + 32] & 0xF) - 32;
int8_t v2 = (int8_t)(((b_ptr[l].qh[hbits_index] >> 4 ) & 3) << 4) | ((b_ptr[l].ql[lbits_index] >> 4) & 0xF) - 32;