1.更新nvidia驅動
選擇自己電腦顯示卡的型号(注意:筆記本的話選擇型号後面帶Notebooks的),下載下傳最新的驅動安裝包,點選下一步安裝
https://www.nvidia.cn/geforce/drivers/
2.CUDA10安裝
下載下傳完成後輕按兩下安裝包,選擇自定義安裝選項,隻勾選CUDA元件
https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
https://developer.nvidia.com/cuda-toolkit-archive
# 檢視是否成功
nvidia-smi
nvcc -V
https://blog.csdn.net/weixin_42493134/article/details/115592492
3.cuDNN 7 安裝
https://repo.anaconda.com/pkgs/main/win-64/
4.PyTorch安裝
https://download.pytorch.org/whl/torch_stable.html
5.驗證
import torch x = torch.rand(5,3) print(x) torch.cuda.is_available()
https://zhuanlan.zhihu.com/p/54350088