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


(Shen Wo) #1

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?

Thanks!!


#2

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


(Shen Wo) #3

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?


#4

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


(Shen Wo) #5

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


#6

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.


(Eduardo) #7

Happening to me with cuda 10 & pytorch 1.0