Skip to content

Commit

Permalink
Merge pull request #102 from PSuchita/dev
Browse files Browse the repository at this point in the history
Update cudaStreamDestroy function
  • Loading branch information
aamodt committed Mar 16, 2019
2 parents a2a942d + d575f94 commit 551da3e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcuda/cuda_runtime_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1569,6 +1569,9 @@ __host__ cudaError_t CUDARTAPI cudaStreamDestroy(cudaStream_t stream)
announce_call(__my_func__);
}
#if (CUDART_VERSION >= 3000)
//synchronization required for application using external libraries without explicit synchronization in the code to
//avoid the stream_manager from spinning forever to destroy non-empty streams without making any forward progress.
synchronize();
g_stream_manager->destroy_stream(stream);
#endif
return g_last_cudaError = cudaSuccess;
Expand Down

0 comments on commit 551da3e

Please sign in to comment.