服务器上使用GPU,报以下错误,如何解决?
RuntimeError: The NVIDIA driver on your system is too old (found version 11070). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver.
原因分析
一般是因为cuda 和 torch 不匹配,如果不想更新cuda,就重装一下torch
首先nvidia-smi
得到cuda版本11.7
然后python import torch print(torch.__version__)
然后就发现这个cu版本不对
现在去官网https://pytorch.org/get-started/previous-versions/
复制这条命令直接去服务器上运行就可以了