cuda 安装
1 查看显卡对应的算力
参考:NVIDIA
比如:
2 关于 cuda 和 cudnn 对应的版本
参考:清华镜像源
3 算力 和 torch 之间的对应关系
4 安装教程
https://zhuanlan.zhihu.com/p/643760062
相关命令
wget https://developer.download.nvidia.com/compute/cuda/11.3.0/local_installers/cuda_11.3.0_465.19.01_linux.run
sudo sh cuda_11.3.0_465.19.01_linux.run
tar -xzvf cudnn-10.2-linux-x64-v7.6.5.32.tgz
vim ~/.bashrc
export CUDA_HOME=/home/xyc/cuda_home/cuda_11.3
export PATH="/home/xyc/cuda_home/cuda_11.3/bin:$PATH"
export LD_LIBRARY_PATH="/home/xyc/cuda_home/cuda_11.3/lib64:LD_LIBRARY_PATH"
source ~/.bashrc
cd /home/xyc/cuda_folder/cuda_11.3/
cp ./cuda/include/cudnn*.h /home/xyc/cuda_home/cuda_11.3/include
cp -P ./cuda/lib64/libcudnn* /home/xyc/cuda_home/cuda_11.3/lib64
chmod a+r /home/xyc/cuda_home/cuda_11.3/include/cudnn*.h
chmod a+r /home/xyc/cuda_home/cuda_11.3/lib64/libcudnn*
source ~/.bashrc
5 cuda版本下载
https://developer.nvidia.com/cuda-toolkit-archive
6 cudann 版本下载
https://developer.nvidia.com/rdp/cudnn-archive
https://developer.nvidia.com/rdp/cudnn-archive
7 pytorch 版本
8 CUDA 11.3 和 CUDNN 安装
pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1 --extra-index-url https://download.pytorch.org/whl/cu113
pip install pyg-lib torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html
因上求缘,果上努力~~~~ 作者:图神经网络,转载请注明原文链接:https://www.cnblogs.com/BlairGrowing/p/18024993