UserWarning: CUDA initialization:



我在HPC集群上使用虚拟环境安装了Pytorch 1.8.1+cu102。

torch.cuda.is_available() 

的输出如下

UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 10010). 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. (Triggered internally at  /pytorch/c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
False

怎么了?我不知道如何更新驱动程序。我的要求是:

torch==1.8.1+cu102
torch-cluster==1.5.9
torch-geometric==1.7.0

首先,您需要检查Pytorch需要哪个版本。你可以在下面的链接中找到Pytorch对应的cuda版本。

https://pytorch.org/get-started/previous-versions/

找到版本后,您需要检查该版本是否适用于您的GPU设备。你可以在下面的链接中找到这个列表。

https://developer.nvidia.com/cuda-gpus

如果没有匹配,您需要更改pytorch要求或您的GPU设备。

最新更新