diff options
| author | speverel <[email protected]> | 2016-06-09 14:58:38 -0700 |
|---|---|---|
| committer | speverel <[email protected]> | 2016-06-09 14:58:38 -0700 |
| commit | ac11fd57b93e22ee5a50ebf8f6d6b4d6dadbe3cb (patch) | |
| tree | 0f789f7da9d411697301ab7c55cf7a7e2c74dca8 /libcuda | |
| parent | 5e9b6521e625d30f9f3efbb292fd22bdab5c884a (diff) | |
Modified runtime API to support synchronization with the null stream.
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 77456d4..350ba0b 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -440,6 +440,10 @@ extern "C" { * * * * *******************************************************************************/ +cudaError_t cudaPeekAtLastError(void) +{ + return g_last_cudaError; +} __host__ cudaError_t CUDARTAPI cudaMalloc(void **devPtr, size_t size) { @@ -1000,7 +1004,8 @@ __host__ cudaError_t CUDARTAPI cudaStreamSynchronize(cudaStream_t stream) { #if (CUDART_VERSION >= 3000) if( stream == NULL ) - return g_last_cudaError = cudaErrorInvalidResourceHandle; + synchronize(); + return g_last_cudaError = cudaSuccess; stream->synchronize(); #else printf("GPGPU-Sim PTX: WARNING: Asynchronous kernel execution not supported (%s)\n", __my_func__); |
