Torch.cuda.is_available() False even though correct CUDA version and driver are installed

Hi everybody,

I installed Pytorch 1.5.0 using conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
nvidia-smi outputs:
NVIDIA-SMI 440.64.00 Driver Version: 440.64.00 CUDA Version: 10.2

Regarding the information on this site: everything should be fine.

However CUDA is still not working, as torch.cuda.is_available() returns False.

When I run:
import torch
I get the error message: cuda runtime error (802) : system not yet initialized at /opt/conda/conda-bld/pytorch_1587428270644/work/aten/src/THC/THCGeneral.cpp:47

Does someone know how I can solve this?


Did you install the driver recently and if so, did you reboot your machine?
Is the GPU working besides PyTorch, i.e. are you able to run some CUDA samples?

Thank you for the response. It was indeed a driver issue. Seemed to be corrupted. Downgrading it and rebooting helped.