From 4fcfcd05d1b2b01b2f2224406d96a6ea9831ddcb Mon Sep 17 00:00:00 2001 From: Iwan Kawrakow Date: Sun, 16 Jun 2024 17:27:18 +0300 Subject: bitnet: scale is per row, not per tensor --- iqk_mul_mat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'iqk_mul_mat.cpp') diff --git a/iqk_mul_mat.cpp b/iqk_mul_mat.cpp index fa1a0c83..ed8ed2e8 100644 --- a/iqk_mul_mat.cpp +++ b/iqk_mul_mat.cpp @@ -1347,12 +1347,12 @@ static void mul_mat_iq1bn_q8_K64(int n, const void * vx, size_t bx, const DataIn typedef union { float f; uint32_t i; } scale_t; scale_t scale; - uint16_t u = x[0].extra & 0xff; - scale.i = ((((u >> 4) | 0xf0) - 132) << 23) | ((u & 0x0f) << 19); for (int ix = 0; ix < nrc_x; ++ix) { x = (const block_iq1_bn *)((const char *)vx + ix*bx); + uint16_t u = x[0].extra & 0xff; + scale.i = ((((u >> 4) | 0xf0) - 132) << 23) | ((u & 0x0f) << 19); for (int iy = 0; iy < nrc_y; ++iy) accd[iy] = _mm256_setzero_ps(); -- cgit v1.2.3