Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
marigoold committed Jul 28, 2023
1 parent 02d5dae commit 7fa2748
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions oneflow/user/kernels/bincount_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ __global__ static void BinCountCompute(const IDX* in_ptr, const T* weight, T* ou
__shared__ T shm[kCudaThreadsNumPerBlock];
T zero = GetZeroVal<T>();
shm[threadIdx.x] = zero;
__syncthreads();
CUDA_1D_KERNEL_LOOP(i, in_size) {
IDX idx = *(in_ptr + i);
cuda::atomic::Add(shm + idx, weight[i]);
Expand Down

0 comments on commit 7fa2748

Please sign in to comment.