编辑 ~/.bashrc

vim ~/.bashrc

添加如下代码:

export PATH=/usr/local/cuda-10.2/bin\$\{PATH:+:${PATH}} 
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}  

然后保存

source ~/.bashrc  

查看CUDA版本

nvcc -V

屏幕快照 2020-03-03 下午1.23.21.png


RHXCYA
0 声望1 粉丝