【Bug解决】GeForce RTX 3070 with CUDA capability sm_86 is not compatible with the current PyTorch.

问题分析

F:\软件打包\Dislden_yolo_210510\torch\cuda\__init__.py:104: UserWarning:
GeForce RTX 3070 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.
If you want to use the GeForce RTX 3070 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

  warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
Using CUDA device0 _CudaDeviceProperties(name='GeForce RTX 3070', total_memory=8192MB)

笔者的硬件环境如下:
显卡驱动:CUDA device0 _CudaDeviceProperties(name=‘GeForce RTX 3070’, total_memory=8192MB)
CUDA:11.1
运行pytorch框架的代码时出现的如上问题:现有的pytorch版本与驱动和cuda版本不匹配

解决问题

根据Bug提示打开网址:https://pytorch.org/get-started/locally/
【Bug解决】GeForce RTX 3070 with CUDA capability sm_86 is not compatible with the current PyTorch._第1张图片
输入图示的指令:

pip3 install torch==1.8.1+cu111 torchvision==0.9.1+cu111 torchaudio===0.8.1 -f https://download.pytorch.org/whl/torch_stable.html

再次运行报错前的指令

你可能感兴趣的:(bug)