From 445a3734b743e9230a09e3198d8466da8843e4a7 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Thu, 25 Jan 2024 15:38:39 -0500 Subject: [PATCH] kompute : fix basic Q6_K get_rows, 26 -> 24 failures --- kompute-shaders/common.comp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kompute-shaders/common.comp b/kompute-shaders/common.comp index 0918657d5..62d62b025 100644 --- a/kompute-shaders/common.comp +++ b/kompute-shaders/common.comp @@ -73,9 +73,6 @@ struct block_q6_k { }; mat4 dequantize_q6_k(const block_q6_k xb, uint il) { const float16_t d_all = xb.d; - uint8_t ql[QK_K/2]; - uint8_t qh[QK_K/4]; - int8_t scales[QK_K/16]; const uint qlIndex = 64*(il/8) + 32*((il/2)&1) + 16*(il&1); const uint qhIndex = 32*(il/8) + 16*(il&1); @@ -89,8 +86,8 @@ mat4 dequantize_q6_k(const block_q6_k xb, uint il) { const float16_t dl = float16_t(d_all * sc * coef); mat4 reg; for (int i = 0; i < 16; ++i) { - const float16_t q = (il&1) != 0 ? ((ql[qlIndex + i] & kmask2) | ((qh[qhIndex + i] & kmask1) << 2)) - : ((ql[qlIndex + i] & kmask2) | ((qh[qhIndex + i] & kmask1) << 4)); + const float16_t q = (il&1) != 0 ? ((xb.ql[qlIndex + i] & kmask2) | ((xb.qh[qhIndex + i] & kmask1) << 2)) + : ((xb.ql[qlIndex + i] & kmask2) | ((xb.qh[qhIndex + i] & kmask1) << 4)); reg[i/4][i%4] = dl * q - ml; } return reg;