PPxin commited on
Commit
c3a7159
·
1 Parent(s): 849ff52

fix softmax r2r result wrong issue (llama/7811)

Browse files
Files changed (1) hide show
  1. ggml-sycl.cpp +1 -0
ggml-sycl.cpp CHANGED
@@ -9108,6 +9108,7 @@ static void soft_max_f32(const float * x, const float * mask, float * dst, const
9108
  // find the sum of exps in the block
9109
  tmp = warp_reduce_sum(tmp, item_ct1);
9110
  if (block_size > WARP_SIZE) {
 
9111
  if (warp_id == 0) {
9112
  buf[lane_id] = 0.f;
9113
  }
 
9108
  // find the sum of exps in the block
9109
  tmp = warp_reduce_sum(tmp, item_ct1);
9110
  if (block_size > WARP_SIZE) {
9111
+ item_ct1.barrier(sycl::access::fence_space::local_space);
9112
  if (warp_id == 0) {
9113
  buf[lane_id] = 0.f;
9114
  }