Skip to content

Commit 054d4ea

Browse files
fix out-of-bounds writes
1 parent bd89bb3 commit 054d4ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml-cuda/mmq.cuh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,10 @@ static __device__ __forceinline__ void mmq_write_back_mma(const float * __restri
13491349

13501350
const int i = blockIdx.x*mmq_y + i0 + mma_C::get_i(l);
13511351

1352+
if (need_check && i >= ne0) {
1353+
continue;
1354+
}
1355+
13521356
dst[j*ne0 + i] = sum[(j0/mma_C::J)*mma_C::ne + l];
13531357
}
13541358
}

0 commit comments

Comments
 (0)