cuda多版本切换

摘自:http://blog.csdn.net/Maple2014/article/details/78574275


多个 cuda 版本之间进行切换

将~/.bashrc 或 ~/.zshrc 下与cuda相关的路径都改为 
/usr/local/cuda/ 
而不使用 /usr/local/cuda-8.0/ 或/usr/local/cuda-9.0/。

#在切换cuda版本时
rm -rf /usr/local/cuda#删除之前创建的软链接

sudoln-s /usr/local/cuda-8.0/ /usr/local/cuda/
nvcc--version #查看当前 cuda 版本
nvcc: NVIDIA (R) Cuda compiler driverCopyright (c)2005-2016NVIDIA CorporationBuiltonMon_Jan_23_12:24:11_CST_2017Cuda compilation tools, release8.0, V8.0.62

#cuda8.0 切换到 cuda9.0
rm -rf /usr/local/cuda
sudo ln -s /usr/local/cuda-9.0/ /usr/local/cuda/
nvcc--version



install cuda


download url:https://developer.nvidia.com/cuda-75-downloads-archive

commands needs for Instructions:7.5:

`sudo rpm -i cuda-repo-rhel7-7-5-local-7.5-18.x86_64.rpm`

`sudo yum clean all`

`sudo yum install cuda`



echo $PATH

/usr/local/cuda-8.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

-bash-4.2# export PATH=/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

-bash-4.2# echo $PATH

/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin

你可能感兴趣的:(cuda多版本切换)