File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -385,8 +385,11 @@ kernel void kernel_soft_max(
385
385
pdst[i00] = exp_psrc0;
386
386
}
387
387
388
+ // This barrier fixes a failing test
389
+ // ref: https://github.com/ggerganov/ggml/pull/621#discussion_r1425156335
390
+ threadgroup_barrier (mem_flags::mem_none);
391
+
388
392
float sum = simd_sum (lsum);
389
- threadgroup_barrier (mem_flags::mem_threadgroup);
390
393
391
394
if (ntg > N_SIMDWIDTH) {
392
395
if (sgitg == 0 ) {
@@ -470,9 +473,13 @@ kernel void kernel_soft_max_4(
470
473
}
471
474
472
475
const float lsum = lsum4[0 ] + lsum4[1 ] + lsum4[2 ] + lsum4[3 ];
473
- threadgroup_barrier (mem_flags::mem_threadgroup);
476
+
477
+ // This barrier fixes a failing test
478
+ // ref: https://github.com/ggerganov/ggml/pull/621#discussion_r1425156335
479
+ threadgroup_barrier (mem_flags::mem_none);
474
480
475
481
float sum = simd_sum (lsum);
482
+
476
483
if (ntg > N_SIMDWIDTH) {
477
484
if (sgitg == 0 ) {
478
485
buf[tiisg] = 0 .0f ;
You can’t perform that action at this time.
0 commit comments