Skip to content

Commit 9331895

Browse files
fix perplexity for batch size > 32
1 parent 44acb8b commit 9331895

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ggml-cuda.cu

+3-1
Original file line numberDiff line numberDiff line change
@@ -4040,7 +4040,9 @@ static __global__ void cpy_f32_q8_0(
40404040
src = &zero;
40414041
} else {
40424042
src = x;
4043-
memcpy(&dst[1 + iqs/8].qs[sizeof(float) * (iqs % 8)], src, sizeof(float));
4043+
if (i0 / QK8_0 == (i_blck_0 + ne00) / QK8_0) {
4044+
memcpy(&dst[1 + iqs/8].qs[sizeof(float) * (iqs % 8)], src, sizeof(float));
4045+
}
40444046
}
40454047

40464048
float val;

0 commit comments

Comments
 (0)