当前位置:网站首页>Correspondence between rtx3090 and pytorch versions
Correspondence between rtx3090 and pytorch versions
2022-06-21 22:22:00 【mingqian_ chu】
stay RTX 3090 Judge , The current version of torch Whether the version can be used , Generally, the following methods are required :
- conda activate torch1.8.1 ( Activate the relevant virtual environment )
pythonGet into python Environmental Science ,import torchImport torch Installation package ;- test
torch.cuda.is_available(), - test
torch.zero(1).cuda()
until , Step 4 complete , To describe the current version of cuda You can call the current version of pytorch;
Key points of the problem :
- install pytorch In the process , There are two points to note , One is currently installed pytorch edition , The pytroch The official version website specifies which versions are included cuda edition ;
- Use
pip install torch==1.8.1Mode of installation , The default is torch edition + On the current host cuda edition- Possible problems , Current host cuda edition Incompatible with this torch Several official releases in the version cuda edition ;
1. Problem phenomenon
>>> torch.zeros(1).cuda()
/home/respecting/anaconda3/envs/torch1.8.1/lib/python3.7/site-packages/torch/cuda/__init__.py:104: UserWarning:
NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70.
If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
1.1 Problem analysis
Indicates the currently installed pytorch The version does not match the appropriate cuda, At present pytorch Version of cuda The version does not correspond to its own host , Installed cuda edition ,
pytorch Installed in cuda edition , There are two conditions that need to be met :
- At present pytorch Version of computing power support The computing power of the graphics card on the current machine ;
- pytorch Medium cuda edition It cannot be higher than the one already installed on the current machine cuda edition ;
Specifically , The same pytorch edition , such as pytorch 1.8.1 Will correspond to different versions of cuda
# ROCM 4.0.1 (Linux only)
pip install torch==1.8.1+rocm4.0.1 torchvision==0.9.1+rocm4.0.1 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# ROCM 3.10 (Linux only)
pip install torch==1.8.1+rocm3.10 torchvision==0.9.1+rocm3.10 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 11.1
pip install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 10.2
pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# CUDA 10.1
pip install torch==1.8.1+cu101 torchvision==0.9.1+cu101 torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
# CPU only
pip install torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1 -f https://download.pytorch.org/whl/torch_stable.html
1.2 solve the problem
pytorch Installed in cuda edition , There are two conditions that need to be met :
- At present pytorch Version of computing power support The computing power of the graphics card on the current machine ;
- pytorch Medium cuda The version cannot be higher than the one already installed on the current machine cuda edition ;
Knowing the cause of the problem , We can solve the problem :
- RTX3090 Need at least cuda 11.1 edition , To drive the device , So we can install cuda11.1 Above version
- So when you want to install pytorch In the version , Find greater than
cuda11.1 <= pytorch-cuda --version <= Installed on the current machine cuda --version
Because the author installed on the machine is cuda11.2 , and 3090 Corresponding cuda Version must be greater than or equal to cuda11.1,
Therefore, installation pytorch 1.8.1 Medium cuda11.1 edition , Uninstall and reinstall the corresponding version ;
pip install -i https://pypi.douban.com/simple torch-1.8.1+cu111-cp37-cp37m-linux_x86_64.whl
Looking in indexes: https://pypi.douban.com/simple
Processing ./torch-1.8.1+cu111-cp37-cp37m-linux_x86_64.whl
Requirement already satisfied: numpy in /home/respecting/anaconda3/envs/torch1.8.1/lib/python3.7/site-packages (from torch==1.8.1+cu111) (1.21.6)
Requirement already satisfied: typing-extensions in /home/respecting/anaconda3/envs/torch1.8.1/lib/python3.7/site-packages (from torch==1.8.1+cu111) (4.2.0)
Installing collected packages: torch
Attempting uninstall: torch
Found existing installation: torch 1.8.1
Uninstalling torch-1.8.1:
Successfully uninstalled torch-1.8.1
Successfully installed torch-1.8.1+cu111
torchvision install
(torch1.8.1) [email protected]:/media/respecting/Ubuntu 18.0/June18$ pip install -i https://pypi.douban.com/simple torch-1.8.1+cu111-cp37-cp37m-linux_x86_64.whl
Looking in indexes: https://pypi.douban.com/simple
Processing ./torch-1.8.1+cu111-cp37-cp37m-linux_x86_64.whl
Requirement already satisfied: numpy in /home/respecting/anaconda3/envs/torch1.8.1/lib/python3.7/site-packages (from torch==1.8.1+cu111) (1.21.6)
Requirement already satisfied: typing-extensions in /home/respecting/anaconda3/envs/torch1.8.1/lib/python3.7/site-packages (from torch==1.8.1+cu111) (4.2.0)
Installing collected packages: torch
Attempting uninstall: torch
Found existing installation: torch 1.8.1
Uninstalling torch-1.8.1:
Successfully uninstalled torch-1.8.1
Successfully installed torch-1.8.1+cu111
2. To test
(torch1.8.1) [email protected]:~$ python
Python 3.7.13 (default, Mar 29 2022, 02:18:16)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.zeros(1).cuda()
tensor([0.], device='cuda:0')
>>>
边栏推荐
- [deeply understand tcapulusdb technology] tmonitor module architecture
- 基于OpenCVSharp的001新建工程项目
- Is it OK for Zhongyan futures to open an account? Is the platform reliable? Is it safe?
- 洛谷P1608 路径统计 题解
- Instadeep ltd:arthur flajolet | group based rapid reinforcement learning on a single machine
- Characteristics and experimental suggestions of abbkine cell cycle Staining Kit
- Enzo high sensitivity detection Arg8 vasopressin ELISA Kit
- File i/o
- 软件测试----测试的分类
- Worthington trypsin solution
猜你喜欢

【LeetCode】8、字符串转换整数(atoi)

提升方法(上)AdaBoost

Enterprise data leakage prevention solution sharing

【深入理解TcaplusDB技术】单据受理之表管理

【深入理解TcaplusDB技術】TcaplusDB構造數據

University of Virginia: ingy Elsayed aly | logic based reward formation in Multi-Agent Reinforcement Learning

使用StreamAPI 斷言組合,結合本地緩存做模糊查詢(比mysql效率提昇近1000倍)

I2C【2】-IIC为什么需要用开漏输出和上拉电阻bug

浅学Vector---如何使用常见的接口

从-1开始实现一个中间件
随机推荐
利用tRNAscan-SE做tRNA分析
Pal2Nal|如何在命令行下运行Pal2Nal
Hiclotter|hic data visualization tool
【深入理解TcaplusDB技术】Tmonitor系统升级
线粒体基因组常见缩写与术语
利用for循环,分别计算1-100中奇数的和、偶数的和【方法一】
es7创建索引模板
Dragon lizard community established cloud native SIG and introduced three core technologies
Use the do while loop to calculate the odd and even sums in 1-100 [method 1]
从-1开始实现一个中间件
How to write the title of popular popular items in our media video
DateGridView首列排序
Leetcode question brushing: SF Technology Smart logistics Campus Technology Challenge
Lifting method (I) AdaBoost
Anaconda添加channels
Notes on topic brushing (16) -- binary tree: modification and construction
Dategridview first column sort
迅为iTOP-3568开发板安装 RKNN Toolkit Lite2
【深入理解TcaplusDB技术】一键安装Tmonitor后台
GDB debugging practice (10) multi thread debugging