Last active
February 5, 2018 16:35
-
-
Save sonots/bdce8e970227eeb7bb0d29d0fa03452c to your computer and use it in GitHub Desktop.
nvvp with thrust::reduce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is is asynchronous? or synchronous? How can we run asynchronously? |
A. https://github.com/thrust/thrust/blob/master/examples/cuda/async_reduce.cu (cudaStrream is extra)
ref. NVIDIA/thrust#827
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/thrust/thrust/blob/master/examples/sum.cu
cudaMalloc -> reduce kernel -> cudaDeviceSynchronize -> cudaMemcpyAsync (DtoH) -> cudaFree.
So, it looks thrust::reduce blocks CPU. Q. Any ways to run asynchronously?