Skip to content

Commit

Permalink
Update src/cuda/CUDAStream.cu
Browse files Browse the repository at this point in the history
  • Loading branch information
tomdeakin authored May 13, 2024
1 parent 28c8cc3 commit eede871
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cuda/CUDAStream.cu
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ __global__ void dot_kernel(const T * a, const T * b, T* sums, int array_size)
if (tidx < offset) smem[tidx] += smem[tidx+offset];
}

// First thread writes to host memory directly from the device
if (tidx == 0) sums[blockIdx.x] = smem[tidx];
}

Expand Down

0 comments on commit eede871

Please sign in to comment.