报错信息如下:
torch/cuda/__init__.py:104: UserWarning:
NVIDIA GeForce RTX 3080 Ti 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 NVIDIA GeForce RTX 3080 Ti GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
NVIDIA GeForce RTX 3080 Ti with CUDA capability sm_86意思是RTX 3080 Ti的算力是8.6,而当前安装好的pytorch最高只支持到7.5算力的显卡,也就是说显卡算力和pytorch版本不匹配。要测试显卡算力与当前pytorch是否匹配,可以进入python命令行,依次输入如下两行代码: