From bd8422dbe7aeb87490d7d8de29f146f6e7468b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=A4=C3=9Fler?= Date: Mon, 3 Jun 2024 22:10:28 +0200 Subject: [PATCH] fix out-of-bounds write --- ggml-cuda/mmq.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml-cuda/mmq.cuh b/ggml-cuda/mmq.cuh index 62df7c45f..dda1e341e 100644 --- a/ggml-cuda/mmq.cuh +++ b/ggml-cuda/mmq.cuh @@ -1124,7 +1124,7 @@ static __global__ void mul_mat_q( for (int i0 = 0; i0 < mmq_y; i0 += WARP_SIZE) { const int i = blockIdx.x*mmq_y + i0 + threadIdx.x; - if (need_check && i > ne0) { + if (need_check && i >= ne0) { continue; }