Skip to content

Commit 859f0b6

Browse files
small change
1 parent e4f07bc commit 859f0b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml-cuda.cu

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,8 @@ static __device__ __forceinline__ float vec_dot_q2_K_q8_1(
14031403
// #if __CUDA_ARCH__ >= 600 // lowest compute capability for integer intrinsics
14041404
const block_q2_K * bq2_K = (const block_q2_K *) vbq;
14051405

1406+
const int bq8_offset = 4 * (iqs/8);
1407+
14061408
float sumf = 0;
14071409

14081410
const float d = bq2_K->d;
@@ -1417,7 +1419,7 @@ static __device__ __forceinline__ float vec_dot_q2_K_q8_1(
14171419

14181420
const int vii = (vi >> (2*i)) & 0x03030303;
14191421

1420-
const block_q8_1 * bq8i = bq8_1 + 4 * (iqs/8) + i;
1422+
const block_q8_1 * bq8i = bq8_1 + bq8_offset + i;
14211423
const float d8 = bq8i->d;
14221424
const int qs8 = *((int*) &bq8i->qs[4*(iqs%8)]);
14231425

0 commit comments

Comments
 (0)