Skip to content

Commit

Permalink
Switch test/util/device_atomics.cu over to cudaMemcpyAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Jun 29, 2023
1 parent 7d928c4 commit 9d94386
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpp/test/util/device_atomics.cu
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ TEST(Raft, AtomicIncWarp)
test_atomic_inc_warp_kernel<<<num_blocks, threads_per_block, 0, s>>>(counter.data(),
out_device.data());
// Copy data to host
RAFT_CUDA_TRY(cudaStreamSynchronize(s)); //ensure stream is done before copy
RAFT_CUDA_TRY(cudaMemcpy(out_host.data(),
(const void*)out_device.data(),
num_elts * sizeof(int),
cudaMemcpyDeviceToHost));
RAFT_CUDA_TRY(cudaMemcpyAsync(out_host.data(),
(const void*)out_device.data(),
num_elts * sizeof(int),
cudaMemcpyDeviceToHost,
s));

// Check that count is correct and that each thread index is contained in the
// array exactly once.
Expand Down

0 comments on commit 9d94386

Please sign in to comment.