cuda pytorch torchvision版本对应问题

最近开始学习nlp,安装fairseq,要求pytorch版本>=1.5,而服务器的cuda版本为10.0和9.2的,直接通过conda安装会自动安装对应cuda10.2的pytorch,影响使用。现记录解决这一问题的过程。

1. cuda,pytorch,torchvision的对应关系如下图:

2. pytorch torchvision下载库

https://download.pytorch.org/whl/cu92/torch_stable.html

3. 安装cuda9.2对应的pytorch1.7.1

wget https://download.pytorch.org/whl/cu92/torch-1.7.1%2Bcu92-cp37-cp37m-linux_x86_64.whl
wget https://download.pytorch.org/whl/cu92/torchvision-0.8.2%2Bcu92-cp37-cp37m-linux_x86_64.whl
pip install torch-1.7.1+cu92-cp37-cp37m-linux_x86_64.whl torchvision-0.8.2+cu92-cp37-cp37m-linux_x86_64.whl

原文地址:https://www.cnblogs.com/peng-yuan/p/14659105.html