diff options
| author | Tor Aamodt <[email protected]> | 2019-03-16 11:57:32 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-03-16 11:57:32 -0700 |
| commit | 551da3e81376de7cc35b6ac0fd6eb3b85b32746a (patch) | |
| tree | 2907326278701749f1b79fbed9998d8d0b6bf958 | |
| parent | a2a942d73edcf9e1671148954758246186485df3 (diff) | |
| parent | d575f9464df6358d1be60953e984bcfa9257d1a3 (diff) | |
Merge pull request #102 from PSuchita/dev
Update cudaStreamDestroy function
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 27644b3..cf16d9b 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -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; |
