diff options
| author | Ahmad Alawneh <[email protected]> | 2025-02-15 02:47:41 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-02-14 23:47:41 +0000 |
| commit | c3966b6a8c24f4c64877d5a18335549d3af66d1a (patch) | |
| tree | 8c767d9e6c359092f4c73d36c96cd556d7c72b04 /libcuda | |
| parent | 68e1cd30efaecbd71b496822f9d88a5803b33841 (diff) | |
Cuda12 (#94)
* added support to cuda 12, by predicating texuture cache
* format code
Diffstat (limited to 'libcuda')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 5dfd3fc..3574fc1 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -1942,6 +1942,7 @@ __host__ cudaError_t CUDARTAPI cudaBindTextureInternal( size_t *offset, const struct textureReference *texref, const void *devPtr, const struct cudaChannelFormatDesc *desc, size_t size __dv(UINT_MAX), gpgpu_context *gpgpu_ctx = NULL) { +#if (CUDART_VERSION <= 1200) gpgpu_context *ctx; if (gpgpu_ctx) { ctx = gpgpu_ctx; @@ -1978,12 +1979,14 @@ __host__ cudaError_t CUDARTAPI cudaBindTextureInternal( gpu->gpgpu_ptx_sim_bindTextureToArray(texref, array); devPtr = (void *)(long long)array->devPtr32; printf("GPGPU-Sim PTX: devPtr = %p\n", devPtr); +#endif return g_last_cudaError = cudaSuccess; } __host__ cudaError_t CUDARTAPI cudaBindTextureToArrayInternal( const struct textureReference *texref, const struct cudaArray *array, const struct cudaChannelFormatDesc *desc, gpgpu_context *gpgpu_ctx = NULL) { +#if (CUDART_VERSION <= 1200) gpgpu_context *ctx; if (gpgpu_ctx) { ctx = gpgpu_ctx; @@ -2001,11 +2004,13 @@ __host__ cudaError_t CUDARTAPI cudaBindTextureToArrayInternal( gpu->gpgpu_ptx_sim_findNamefromTexture(texref)); printf("GPGPU-Sim PTX: Texture Normalized? = %d\n", texref->normalized); gpu->gpgpu_ptx_sim_bindTextureToArray(texref, array); +#endif return g_last_cudaError = cudaSuccess; } __host__ cudaError_t CUDARTAPI cudaUnbindTextureInternal( const struct textureReference *texref, gpgpu_context *gpgpu_ctx = NULL) { +#if (CUDART_VERSION <= 1200) gpgpu_context *ctx; if (gpgpu_ctx) { ctx = gpgpu_ctx; @@ -2025,6 +2030,7 @@ __host__ cudaError_t CUDARTAPI cudaUnbindTextureInternal( gpu->gpgpu_ptx_sim_findNamefromTexture(texref)); gpu->gpgpu_ptx_sim_unbindTexture(texref); +#endif return g_last_cudaError = cudaSuccess; } |
