首页 > 其他分享 >总结一下目前遇到的环境问题

总结一下目前遇到的环境问题

时间:2023-01-06 22:11:53浏览次数:62  
标签:总结 遇到 torch 环境 dll current pytorch cuda sm

用pytorch检测cuda环境

#判断是否安装了cuda
import torch
print(torch.cuda.is_available())  #返回True则说明已经安装了cuda

#判断是否安装了cuDNN
from torch.backends import  cudnn 
print(cudnn.is_available())  #返回True则说明已经安装了cuDNN

CUDA capability sm_86 is not compatible with the current PyTorch installation

警告描述:

NVIDIA GeForce RTX 3050 Ti 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_61 sm_70 sm_75 compute_37.

sm那一串可以用如下代码查看

>>> import torch
>>> torch.__version__
'1.10.0+cu113'
>>> torch.cuda.get_arch_list()
['sm_37', 'sm_50', 'sm_60', 'sm_70', 'sm_75', 'sm_80', 'sm_86']

出现这个问题,就是cuda版本低了。我当时是cuda10.2,于是往上升为cuda11.3(就像上面那种组合就没问题)

(之后pytorch和mmcv-full可能也要对应安装)

原文见:https://discuss.pytorch.org/t/nvidia-geforce-rtx-3050-ti-laptop-gpu-with-cuda-capability-sm-86-is-not-compatible-with-the-current-pytorch-installation/143837/4

多个libiomp5md.dll

问题描述:

OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.

问题原因:

为了装对应pytorch,没删干净,装重复了东西。(正常安装应该不会有问题)

解决办法是删了重装或者删掉多余的dll

详见:https://zhuanlan.zhihu.com/p/371649016

(我是卸载了pytorch再重装的)

标签:总结,遇到,torch,环境,dll,current,pytorch,cuda,sm
From: https://www.cnblogs.com/faf4r/p/17031710.html

相关文章