cuda10.1安装

cuda10.1的安装(不兼容,又卸载了)
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html 在这里查看安装的版本,在百度上搜索就行,cuda10.1安装就行,https://docs.nvidia.com/cuda/cuda-quick-start-guide/index.html#ubuntu-x86_64-run按照这个网站安装就行,因为我先安装了418.5的驱动(在软件与更新里选的附加驱动,安装了418驱动),所以只执行了:
sudo sh cuda_10.1.105_418.39_linux.run–silent
然后编辑了.basnrc文件,在其中加入了:
export PATH=/usr/local/cuda-10.1/binKaTeX parse error: Expected '}', got 'EOF' at end of input: {PATH:+:{PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64KaTeX parse error: Expected '}', got 'EOF' at end of input: …LIBRARY_PATH:+:{LD_LIBRARY_PATH}}
最后在终端中:source ~/.bashrc
运行例子:
$ cuda-install-samples-10.1.sh ~
$ cd ~/NVIDIA_CUDA-10.1_Samples/5_Simulations/nbody
$ make
$ ./nbody
查看cuda版本:
cat /usr/local/cuda/version.txt
或者
nvcc --version

你可能感兴趣的:(CUDA)