]> rtime.felk.cvut.cz Git - hercules2020/kcf.git/commitdiff
cufft: Use per-thread CUDA stream for cuBLAS calls
authorMichal Sojka <michal.sojka@cvut.cz>
Thu, 11 Oct 2018 14:39:54 +0000 (16:39 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 11 Oct 2018 14:39:54 +0000 (16:39 +0200)
src/fft_cufft.cpp

index 963c8b7084ff42d3ed24971cb627d2181897bdf9..c7a9e2f1f3197de294b6adde40f60b610462eacb 100644 (file)
@@ -4,6 +4,7 @@ cuFFT::cuFFT()
 {
     CudaSafeCall(cudaSetDeviceFlags(cudaDeviceMapHost));
     cudaErrorCheck(cublasCreate(&cublas));
+    cudaErrorCheck(cublasSetStream(cublas, cudaStreamPerThread));
 }
 
 cufftHandle cuFFT::create_plan_fwd(uint howmany) const