diff options
| author | Tim Rogers <[email protected]> | 2017-05-09 14:09:18 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-05-09 14:09:18 -0400 |
| commit | 0b18b586e78ff474e0b1db58c4f605b2b13b3727 (patch) | |
| tree | 1664ae81a1c4dde1fdd56df043fe21f0c02e79f0 | |
| parent | 96d528311239d6ff82d7bec807a2509b344c9a60 (diff) | |
| parent | 7fe0d9214ba42be543862d8e40849d38f9b818bb (diff) | |
Merge pull request #32 from ElTantawy/dev
support for CUDA 8.0 PTX
| -rw-r--r-- | .travis.yml | 2 | ||||
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 7 | ||||
| -rw-r--r-- | libopencl/opencl_runtime_api.cc | 2 | ||||
| -rw-r--r-- | setup_environment | 2 |
5 files changed, 11 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 18fcd7a..2ffdb12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,6 @@ before_install: - sudo apt-get install -y cuda - sudo apt-get install -y build-essential xutils-dev bison zlib1g-dev flex libglu1-mesa-dev env: - - CUDA_INSTALL_PATH=/usr/local/cuda-7.5/ + - CUDA_INSTALL_PATH=/usr/local/cuda-8.0/ language: cpp script: source ./setup_environment && make @@ -157,6 +157,7 @@ $(SIM_LIB_DIR)/libcudart.so: makedirs $(LIBS) cudalib if [ ! -f $(SIM_LIB_DIR)/libcudart.so.6.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.6.0; fi if [ ! -f $(SIM_LIB_DIR)/libcudart.so.6.5 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.6.5; fi if [ ! -f $(SIM_LIB_DIR)/libcudart.so.7.5 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.7.5; fi + if [ ! -f $(SIM_LIB_DIR)/libcudart.so.8.0 ]; then ln -s libcudart.so $(SIM_LIB_DIR)/libcudart.so.8.0; fi $(SIM_LIB_DIR)/libcudart.dylib: makedirs $(LIBS) cudalib g++ -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,1.1,-current_version,1.1\ diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 8d717c5..cbe8a11 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -126,7 +126,9 @@ #include "host_defines.h" #include "builtin_types.h" #include "driver_types.h" +#if (CUDART_VERSION < 8000) #include "__cudaFatFormat.h" +#endif #include "../src/gpgpu-sim/gpu-sim.h" #include "../src/cuda-sim/ptx_loader.h" #include "../src/cuda-sim/cuda-sim.h" @@ -1795,7 +1797,9 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin ) cuobjdumpRegisterFatBinary(fat_cubin_handle, filename); return (void**)fat_cubin_handle; - } else { + } + #if (CUDART_VERSION < 8000) + else { static unsigned source_num=1; unsigned long long fat_cubin_handle = next_fat_bin_handle++; __cudaFatCudaBinary *info = (__cudaFatCudaBinary *)fatCubin; @@ -1852,6 +1856,7 @@ void** CUDARTAPI __cudaRegisterFatBinary( void *fatCubin ) } return (void**)fat_cubin_handle; } + #endif } void __cudaUnregisterFatBinary(void **fatCubinHandle) diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc index 020384f..63f7c81 100644 --- a/libopencl/opencl_runtime_api.cc +++ b/libopencl/opencl_runtime_api.cc @@ -74,7 +74,9 @@ #define __CUDA_RUNTIME_API_H__ #include "host_defines.h" #include "builtin_types.h" +#if (CUDART_VERSION < 8000) #include "__cudaFatFormat.h" +#endif #include "../src/abstract_hardware_model.h" #include "../src/cuda-sim/cuda-sim.h" #include "../src/cuda-sim/ptx_loader.h" diff --git a/setup_environment b/setup_environment index 2684514..854a335 100644 --- a/setup_environment +++ b/setup_environment @@ -43,7 +43,7 @@ CC_VERSION=`gcc --version | head -1 | awk '{for(i=1;i<=NF;i++){ if(match($i,/^[0 CUDA_VERSION_STRING=`$CUDA_INSTALL_PATH/bin/nvcc --version | awk '/release/ {print $5;}' | sed 's/,//'`; CUDA_VERSION_NUMBER=`echo $CUDA_VERSION_STRING | sed 's/\./ /' | awk '{printf("%02u%02u", 10*int($1), 10*$2);}'` -if [ $CUDA_VERSION_NUMBER -gt 7500 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then +if [ $CUDA_VERSION_NUMBER -gt 8000 -o $CUDA_VERSION_NUMBER -lt 2030 ]; then echo "ERROR ** GPGPU-Sim version $GPGPUSIM_VERSION_STRING not tested with CUDA version $CUDA_VERSION_STRING (please see README)"; return elif [ $CUDA_VERSION_NUMBER -gt 4020 ]; then |
