Torch.cuda.is_available() returns false

Hi folks!

I’m trying to use a pytorch code and torch.cuda.is_available() returns False. The cuda drivers are installed, nvidia drivers are upto date.

  1. nvidia-smi works
  2. nvcc --version works as well

Any ideas on how I can resolve this issue?

System config;
Ubuntu 18.04
NVIDIA driver version 410.48
Cuda 10.0

How did you install PyTorch?
If you are using the binaries, they will use the specified cudatoolkit not your local CUDA installation.
Based on this table you would need the NVIDIA driver >= 418.39 for CUDA10.1, while your current version should work for CUDA9.2.

Thanks man!

Turns out there was a problem with the PyTorch version. Anyway, the issue is now resolved. Thanks for your help.