How to use CUDA 7.5 on gtx 1080 ti?

my environment:
OS:ubuntu 16.04
Graphics:gtx1080ti
Driver:nvidia-390
Lib:CUDA7.5

I use cmake to compile my project.when i set “-gencode=arch=compute_61,code=61” in CmakeLists.txt,i get this error:

nvcc fatal : Unsupported gpu architecture ‘compute_61’

If setting “-gencode=arch=compute_50,code=50”,compiling can be done ,but cuda throw an error:invalid device function 8

I must use CUDA7.5,so how to solve this problom ? who can help me ,thanks.

nVidia maintains an Ubuntu 16.04 repository for more recent CUDA versions here

https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/

This is how to install the repository’s signing key and the repository URL as a packet source for apt

wget -qO - https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | sudo apt-key add -
sudo echo >/etc/apt/sources.list.d/cuda.list "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /"
sudo apt-get update

to install CUDA 8

sudo apt-get install cuda-8.0

CUDA will then reside in /usr/local/cuda-8.0.

make sure your PATH specifies /usr/local/cuda-8.0/bin in front of /usr/bin and LD_LIBRARY_PATH includes /usr/local/cuda-8.0/lib64, otherwise your system will keep using the older nvcc 7.5

@cbuchner1 but i can`t use cuda8. ,because there is a third-party lib based on cuda7.5

Then build for sm_50 with PTX embedded in the binary and rely on the built-in nVidia JIT compiler (in the CUDA driver) to translate the code for your architecture.

The following nvcc options build the machine code for sm_50 and sm_52 (all versions of Maxwell cards) and also includes the PTX for the compute 5.0 architecture so the JIT compiler can do its work for Pascal, Volta and Turing (and future cards).

-gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_50,code=compute_50

This way you can not use hardware features that are present in the sm_60 (Pascal) architecture only.

Hi cbuchner1.
Sorry I can`t understand what you mean.
I write
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -D_FORCE_INLINES -O3 -lineinfo
-gencode=arch=compute_50,code=sm_50
-gencode=arch=compute_52,code=sm_52)
in CmakeLists.txt of my project.But there still is an error “invalid device function 8”
Whether I did something wrong? Could tell me how to do this? Thank you.

Sorry it`s my fault.

as follow:
set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} -D_FORCE_INLINES -O3 -lineinfo
-gencode=arch=compute_50,code=sm_50
-gencode=arch=compute_52,code=sm_52
-gencode=arch=compute_50,code=compute_50)
My project works fine.
Thanks!

my last cuda software release was made with cuda 7.5 (static linking) with -arch=sm_20 only, nothing else. I found this to have the best portability (meaning that it can run on most existing GPUs out-of-box) and speed (cuda 8/9 did something that clipped my code’s speed by 25%).

I don’t see any benefit specifying the CC versions compared to setting the lowest arch flag (in the case of cuda 7-8, it is sm_20, for cuda 9, it is sm_30). are there any benefit that I am not aware?