summaryrefslogtreecommitdiff
path: root/libcuda
diff options
context:
space:
mode:
authorWilliamMTK <[email protected]>2025-02-24 08:03:32 -0500
committerGitHub <[email protected]>2025-02-24 13:03:32 +0000
commit63e254873770365f60e143be1fb60642e8303fc0 (patch)
tree3499618089282285c8d64fc427dc74cb1037e312 /libcuda
parent16c0a979bdf21c502088095f76619d4e2c279a0d (diff)
fix_cudaStreamSynchronize: fix the issue (#100)
Diffstat (limited to 'libcuda')
-rw-r--r--libcuda/cuda_runtime_api.cc6
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(