Skip to content

Commit befeb03

Browse files
committed
fix race condition in adamw
1 parent 0be14bf commit befeb03

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/kernels/adamw.cu‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ __global__ void adamw_kernel(floatX* params_memory, const floatX* grads_memory,
122122
if(threadIdx.x == 0) {
123123
block_abs_max = 0.f;
124124
}
125+
__syncthreads();
125126

126127
float thread_abs_max = 0.0f;
127128
vec_x_t p_new = adamw_update(params_memory,

0 commit comments

Comments
 (0)