Skip to content

Commit 345737d

Browse files
committed
add sync
1 parent 187e23a commit 345737d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

paddle/fluid/platform/cuda_device_function.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ __device__ T reduceSum(T val, int tid, int len) {
6363
val += platform::CudaShuffleDownSync(mask, val, offset);
6464

6565
if (tid < warpSize) shm[tid] = 0;
66+
__syncthreads();
6667

6768
if (tid % warpSize == 0) {
6869
shm[tid / warpSize] = val;

0 commit comments

Comments
 (0)