summaryrefslogtreecommitdiff
path: root/libcuda/cuda_runtime_api.cc
diff options
context:
space:
mode:
authorbftf <[email protected]>2019-11-12 19:14:16 -0800
committerbftf <[email protected]>2019-11-12 19:14:16 -0800
commit57d2df04da439b1055590f10cff5f5f50791b9d9 (patch)
tree6afbf62e80a0f0181a2fe126b467c795a03174d3 /libcuda/cuda_runtime_api.cc
parent555cce395bb8457a209b26f6f7ff62cc09839fdf (diff)
Updated the ifdef flag which enables/disables the relevant code blocks for cuda 10; while assuring backwards compatibility for older cuda versions
Diffstat (limited to 'libcuda/cuda_runtime_api.cc')
-rw-r--r--libcuda/cuda_runtime_api.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc
index fd092e5..71b8722 100644
--- a/libcuda/cuda_runtime_api.cc
+++ b/libcuda/cuda_runtime_api.cc
@@ -1449,7 +1449,7 @@ __host__ cudaError_t CUDARTAPI cudaConfigureCall(dim3 gridDim, dim3 blockDim, si
}
-#if CUDA_VERSION >= 1000
+#if CUDART_VERSION >= 10000
/*
* CUDA 10 requires a new CUDA kernel launch sequence
* A call to __cudaPushCallConfiguration() preceeds any call to cudaLaunchKernel()
@@ -1489,7 +1489,7 @@ __host__ cudaError_t CUDARTAPI __cudaPopCallConfiguration()
return cudaSuccess;
}
-#endif // #if CUDA_VERSION >= 1000
+#endif // #if CUDART_VERSION >= 10000
__host__ cudaError_t CUDARTAPI cudaSetupArgument(const void *arg, size_t size, size_t offset)
@@ -1596,12 +1596,12 @@ __host__ cudaError_t CUDARTAPI cudaLaunchKernel ( const char* hostFun, dim3 grid
CUctx_st *context = GPGPUSim_Context();
function_info *entry = context->get_kernel(hostFun);
-#if CUDA_VERSION >= 1000
+#if CUDART_VERSION >= 10000
assert(g_cudaPushArgsBuffer::g_is_initialized == false);
cudaConfigureCall(g_cudaPushArgsBuffer::g_gridDim, g_cudaPushArgsBuffer::g_blockDim, g_cudaPushArgsBuffer::g_sharedMem, g_cudaPushArgsBuffer::g_stream);
#else
- cudaConfigureCall(gridDim, blockDim, sharedMem, stream);
-#endif // #if CUDA_VERSION >= 1000
+ cudaConfigureCall(gridDim, blockDim, sharedMem, stream);
+#endif // #if CUDART_VERSION >= 10000
for(unsigned i = 0; i < entry->num_args(); i++){
std::pair<size_t, unsigned> p = entry->get_param_config(i);