@TOC
the probability of this problem is that the CUDA version used for compilation is inconsistent with the CUDA version running
first check the CUDA version of the system (that is, the CUDA version used for compilation)
nvcc -V
In my pytorch + CONDA environment, you can use CONDA list to view the cudatoolkit version in the virtual environment. At first, the CUDA version of my system is 9.0 and the cudatoolkit version is 10.2. Therefore, the version is inconsistent, so the error message shown in the title appears. Later, I switched the CUDA version of the system and the problem was solved
brief description of the specific version switching method:
echo $path view CUDA path information, add the path of cuda10.2 and link it to/usr/local/CUDA. The specific instructions are
ln -s /usr/local/cuda10.2 /usr/local/cuda
Then modify the system path as follows:
vim ~/.bashrc
Add code at the end
export PATH=/usr/local/cuda:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
Press ESC, enter: WQ, press enter to exit, and then enter on the command line
source ~/.bashrc
Update path information
now enter from the command line
nvcc -V
You can view the CUDA version after switching