cuda和cudnn的卸载与安装
查看cuda当前版本
卸载cuda9.0
sudo /usr/local/cuda-9.0/bin/uninstall_cuda_9.0.pl
sudo rm -rf /usr/local/cuda-9.0
删除cudnn7.4
sudo rm -rf /usr/local/cuda/include/cudnn.h
sudo cp lib64/lib* /usr/local/cuda/lib64/
---------------------------------------------------------------------------------------
重新安装cuda8.0
sudo chmod a+x cuda_8.0.61_375.26_linux.run
sudo sh cuda_8.0.61_375.26_linux.run
accept
n
y
y
y
其余均回车
sudo gedit ~/.bashrc
//将之前的修改为
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
//查看当前版本
nvcc -V
重新安装cudnn6.0
//解压cudnn文件夹
cd cuda
sudo cp include/cudnn.h /usr/local/cuda/include/
sudo cp lib64/libcudnn* /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
//查看当前cudnn版本
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2