Skip to content

Commit fece1fe

Browse files
fix compiler warning
1 parent 2272765 commit fece1fe

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ggml-cuda/fattn.cu

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,11 @@ static __global__ void flash_attn_vec_ext_f16(
225225
dst[j_dst*D*gridDim.y + D*blockIdx.y + tid] = dst_val;
226226
}
227227

228-
if (parallel_blocks == 1 || tid != 0) {
229-
return;
230-
}
228+
if (parallel_blocks != 1 && tid != 0) {
231229
#pragma unroll
232-
for (int j = 0; j < ncols; ++j) {
233-
dst_meta[(ic0 + j)*gridDim.y*parallel_blocks + blockIdx.y*parallel_blocks + ip] = make_float2(kqmax[j], kqsum[j]);
230+
for (int j = 0; j < ncols; ++j) {
231+
dst_meta[(ic0 + j)*gridDim.y*parallel_blocks + blockIdx.y*parallel_blocks + ip] = make_float2(kqmax[j], kqsum[j]);
232+
}
234233
}
235234
#else
236235
NO_DEVICE_CODE;

0 commit comments

Comments
 (0)