欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

Pytorch 版本与 cuda 版本不匹配问题

最编程 2024-10-09 17:17:35
...

文章目录

  • ????问题:Python11.8安装pytorch11.3失败
  • ????CUDA版本和pytorch版本的关系
  • ????安装Pytorch2.0.0
    • ????pip方法
    • ????cuda方法

????问题:Python11.8安装pytorch11.3失败

????CUDA版本和pytorch版本的关系

+-------+-----------------------------------------+
| CUDA  |       Supported PyTorch Versions        |
+-------+-----------------------------------------+
| 11.8  | 2.0.0                                   |
| 11.7  | 2.0.0, 1.13.1, 1.13.0                   |
| 11.6  | 1.13.1, 1.13.0, 1.12.1, 1.12.0          |
| 11.3  | 1.12.0, 1.12.1, 1.11.0, 1.10.1, 1.10.0, |
|       | 1.9.1, 1.9.0, 1.8.1                     |
| 11.1  | 1.10.0, 1.9.1, 1.9.0, 1.8.2, 1.8.1,     |    
|       | 1.8.0                                   |
| 11.0  | 1.7.1, 1.7.0                            |
| 10.2  | 1.12.0, 1.12.1, 1.11.0, 1.10.1, 1.10.0, |
|       | 1.9.1,1.9.0, 1.8.2, 1.8.1, 1.8.0, 1.7.1,|
|       | 1.7.0, 1.6.0, 1.5.1, 1.5.0              |
| 10.1  | 1.8.1, 1.7.1, 1.7.0, 1.6.0, 1.5.1,      |
|       | 1.5.0, 1.4.0                            |
| 10.0  | 1.2.0, 1.1.0, 1.0.1, 1.0.0              |
| 9.2   | 1.7.1, 1.7.0, 1.6.0, 1.5.1, 1.5.0,      |
|       | 1.4.0, 1.2.0                            |
| 9.0   | 1.1.0, 1.0.1, 1.0.0                     |
| 8.0   | 1.0.0                                   |
+-------+-----------------------------------------+

发现cuda11.8支持pytorch2.0.0

????安装Pytorch2.0.0

官网:https://pytorch.org/get-started/previous-versions/

????pip方法

# CUDA 11.8
pip install torch==2.0.0 torchvision==0.15.1 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118

在这里插入图片描述
安装成功。

????cuda方法

# CUDA 11.8
conda install pytorch==2.0.0 torchvision==0.15.0 torchaudio==2.0.0 pytorch-cuda=11.8 -c pytorch -c nvidia

推荐阅读