From 842ac0daa27da292dc7466dce8c309bf3bed11c9 Mon Sep 17 00:00:00 2001 From: Deval Shah Date: Fri, 16 Nov 2018 11:28:08 -0800 Subject: changes for cuda 4.2 support --- libcuda/cuda_runtime_api.cc | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'libcuda/cuda_runtime_api.cc') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 4b50e34..e429f3f 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -1761,14 +1761,6 @@ int CUDARTAPI __cudaSynchronizeThreads(void**, void*) * * *******************************************************************************/ -#if (CUDART_VERSION >= 3010 && CUDART_VERSION < 8000) - -typedef struct CUuuid_st { /**< CUDA definition of UUID */ - char bytes[16]; -} CUuuid; - -#endif - #if (CUDART_VERSION >= 3010) int dummy0() { if(g_debug_execution >= 3){ @@ -3403,7 +3395,7 @@ CUresult CUDAAPI cuDeviceTotalMem(size_t *bytes, CUdevice dev) return CUDA_SUCCESS; } #endif /* CUDART_VERSION >= 3020 */ - +#if (CUDART_VERSION > 5000) CUresult CUDAAPI cuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevice dev) { if(g_debug_execution >= 3){ @@ -3414,7 +3406,7 @@ CUresult CUDAAPI cuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevi return CUDA_SUCCESS; } - +#endif CUresult CUDAAPI cuDeviceGetProperties(CUdevprop *prop, CUdevice dev) { if(g_debug_execution >= 3){ @@ -3999,7 +3991,7 @@ CUresult CUDAAPI cuIpcCloseMemHandle(CUdeviceptr dptr) #endif /* CUDART_VERSION >= 4010 */ -#if CUDART_VERSION >= 4000 +#if CUDART_VERSION >= 6050 CUresult CUDAAPI cuMemHostRegister(void *p, size_t bytesize, unsigned int Flags) { if(g_debug_execution >= 3){ @@ -4008,6 +4000,8 @@ CUresult CUDAAPI cuMemHostRegister(void *p, size_t bytesize, unsigned int Flags) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } +#endif +#if CUDART_VERSION >= 4000 CUresult CUDAAPI cuMemHostUnregister(void *p) { -- cgit v1.3 From de1b5702b2f12b8ca56b877fd1dd6f6b678aa397 Mon Sep 17 00:00:00 2001 From: Deval Shah Date: Fri, 16 Nov 2018 11:38:46 -0800 Subject: changes for cuda 6.0 --- libcuda/cuda_runtime_api.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libcuda/cuda_runtime_api.cc') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index e429f3f..6346382 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -3738,7 +3738,7 @@ CUresult CUDAAPI cuModuleGetSurfRef(CUsurfref *pSurfRef, CUmodule hmod, const ch return CUDA_SUCCESS; } -#if CUDART_VERSION >= 5050 +#if CUDART_VERSION >= 6050 CUresult CUDAAPI cuLinkCreate(unsigned int numOptions, CUjit_option *options, void **optionValues, CUlinkState *stateOut) @@ -3794,6 +3794,9 @@ cuLinkAddFile(CUlinkState state, CUjitInputType type, const char *path, addedFile = true; return CUDA_SUCCESS; } +#endif + +#if CUDART_VERSION >= 5050 CUresult CUDAAPI cuLinkComplete(CUlinkState state, void **cubinOut, size_t *sizeOut) -- cgit v1.3 From 9c13b6294f3f34d08f07b0381ce9cd43ca7156a1 Mon Sep 17 00:00:00 2001 From: Deval Shah Date: Fri, 16 Nov 2018 11:45:11 -0800 Subject: changes for cuda 5.5 --- libcuda/cuda_runtime_api.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcuda/cuda_runtime_api.cc') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 6346382..d47df42 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -378,7 +378,7 @@ struct _cuda_device_id *GPGPUSim_Init() prop->textureAlignment = 0; // * TODO: Update the .config and xml files of all GPU config files with new value of sharedMemPerBlock and regsPerBlock prop->sharedMemPerBlock = the_gpu->shared_mem_per_block(); -#if (CUDART_VERSION > 5000) +#if (CUDART_VERSION > 5050) prop->regsPerMultiprocessor = the_gpu->num_registers_per_core(); prop->sharedMemPerMultiprocessor = the_gpu->shared_mem_size(); #endif @@ -974,7 +974,7 @@ __host__ cudaError_t CUDARTAPI cudaGetDeviceProperties(struct cudaDeviceProp *pr } } -#if (CUDART_VERSION > 5000) +#if (CUDART_VERSION > 5050) __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device) { if(g_debug_execution >= 3){ -- cgit v1.3 From 1b0d1f38032d923ee813c797d8d71a1645a19c0b Mon Sep 17 00:00:00 2001 From: Deval Shah Date: Fri, 16 Nov 2018 11:48:39 -0800 Subject: changes for cuda 5.5 --- libcuda/cuda_runtime_api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcuda/cuda_runtime_api.cc') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index d47df42..4497d35 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -3395,7 +3395,7 @@ CUresult CUDAAPI cuDeviceTotalMem(size_t *bytes, CUdevice dev) return CUDA_SUCCESS; } #endif /* CUDART_VERSION >= 3020 */ -#if (CUDART_VERSION > 5000) +#if (CUDART_VERSION > 5050) CUresult CUDAAPI cuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevice dev) { if(g_debug_execution >= 3){ -- cgit v1.3 From 58ea11608f1e404672af12f54751517cfd0d804e Mon Sep 17 00:00:00 2001 From: Deval Shah Date: Fri, 16 Nov 2018 12:04:29 -0800 Subject: changes for cuda 5.5 --- libcuda/cuda_runtime_api.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libcuda/cuda_runtime_api.cc') diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 4497d35..95a3c24 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -974,7 +974,7 @@ __host__ cudaError_t CUDARTAPI cudaGetDeviceProperties(struct cudaDeviceProp *pr } } -#if (CUDART_VERSION > 5050) +#if (CUDART_VERSION > 5000) __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDeviceAttr attr, int device) { if(g_debug_execution >= 3){ @@ -1135,12 +1135,14 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic case 80: *value= 0; break; + #if (CUDART_VERSION > 5050) case 81: *value= prop->sharedMemPerMultiprocessor; break; case 82: *value= prop->regsPerMultiprocessor; break; + #endif case 83: case 84: case 85: @@ -3395,7 +3397,7 @@ CUresult CUDAAPI cuDeviceTotalMem(size_t *bytes, CUdevice dev) return CUDA_SUCCESS; } #endif /* CUDART_VERSION >= 3020 */ -#if (CUDART_VERSION > 5050) +#if (CUDART_VERSION > 5000) CUresult CUDAAPI cuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevice dev) { if(g_debug_execution >= 3){ -- cgit v1.3