Torch.cuda.is_available() gives false for cuda8.0

Hi, I tried to install Pytorch on a Red Hat server with Cuda 8.0, 9.0 installed. However, after the installation, the is_available() always returns false.

I tried to install Pytorch using both conda and pip, and also tried both Cuda versions, problem still remains. While is_available() returns false all the time, torch.version.cuda actually gives me the correct version (8.0.61 in my case). Any clues what went wrong?


check upon your driver. does nvidia-smi look okay? is in your library path?

Thank you for your reply. I tried to run nvidia-smi, it gave me:
Failed to initialize NVML: Driver/library version mismatch

Does it mean I need to upgrade my nvidia driver to make it match?

yes it looks like your driver install is corrupted, upgrade / reinstall the driver.

Problem solved by rebooting the server. Thank you so much for your help!!

I met the same problem, and nvidia-smi looks okay, and rebooting the server can’t work? Is there any solution?

ps. my cuda is 9.0, and driver is 390.77.

Happening to me with cuda 10 & pytorch 1.0