Skip to content

Commit

Permalink
cuda : fix data race in soft max (#5853)
Browse files Browse the repository at this point in the history
  • Loading branch information
slaren authored Mar 3, 2024
1 parent 231ae28 commit 67be2ce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ggml-cuda.cu
Original file line number Diff line number Diff line change
Expand Up @@ -6904,6 +6904,7 @@ static __global__ void soft_max_f32(const float * x, const float * mask, const f
// find the sum of exps in the block
tmp = warp_reduce_sum(tmp);
if (block_size > WARP_SIZE) {
__syncthreads();
if (warp_id == 0) {
buf_iw[lane_id] = 0.0f;
}
Expand Down

0 comments on commit 67be2ce

Please sign in to comment.