diff options
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 502b941..472f6bd 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -2120,8 +2120,10 @@ __host__ cudaError_t CUDARTAPI cudaStreamSynchronizeInternal( announce_call(__my_func__); } #if (CUDART_VERSION >= 3000) - if (stream == NULL) ctx->synchronize(); - return g_last_cudaError = cudaSuccess; + if (stream == NULL) { + ctx->synchronize(); + return g_last_cudaError = cudaSuccess; + } stream->synchronize(); #else printf( |
