From 63e254873770365f60e143be1fb60642e8303fc0 Mon Sep 17 00:00:00 2001 From: WilliamMTK Date: Mon, 24 Feb 2025 08:03:32 -0500 Subject: fix_cudaStreamSynchronize: fix the issue (#100) --- libcuda/cuda_runtime_api.cc | 6 ++++-- 1 file 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( -- cgit v1.3