NVIDIA GeForce RTX 3050 Laptop GPU with CUDA capability sm_86 is not compatible with current PyTorch

NVIDIA GeForce RTX 3050 Laptop GPU 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

root@7cd0ba7d49bc:/app
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

>>> import torch
>>> torch.__version__
'1.12.1+cu102'
>>> print (torch.cuda.is_available());
True
leon@leon:~$ nvidia-smi
Wed Sep 14 15:55:07 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.141.03   Driver Version: 470.141.03   CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
| N/A   39C    P8     6W /  N/A |    726MiB /  3902MiB |      3%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

解决方法:

https://pytorch.org/get-started/locally/#supported-linux-distributions

选择合适的版本,然后进入镜像,卸载原来的torch, 然后用pip重新安装

可以把修复的容器保存为镜像。

接下来我们看一下pytorch对应版本是否有问题:
https://pytorch.org/get-started/previous-versions/

我们可以看到cuda版本如果是11.1,那么所对应torch的版本应该是v1.8.0,但是我们刚才查看版本是1.6.0。接下来就简单啦。升级我们的pytorch。
复制上图对应11.1的命令到cmd又出现如下报错:
torchvision 0.7.0+cu101 has requirement torch1.6.0, but you’ll have torch 1.8.0 which is incompatible.

那我们就单独再download一遍:
pip install –upgrade torchvision0.9.0
报错如下:
Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: ‘d:\anaconda3.7\anaconda\lib\site-packages\torch_c.cp37-win_amd64.pyd’
Consider using the –user option or check the permissions.

参考:
https://blog.csdn.net/Xunuo1995/article/details/115261069

Original: https://blog.csdn.net/shelutai/article/details/126853699
Author: shelutai
Title: NVIDIA GeForce RTX 3050 Laptop GPU with CUDA capability sm_86 is not compatible with current PyTorch

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/708741/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球