Pytorch is not detecting cuda enabled devices

I have the following packages installed on my conda environment:

my nvidia drivers are:

But pytorch returns false when:

Any ideas what’s going on here?

Never mind folks, I found that after restarting only then torch.cuda.is_available() returned True. One thing though that seems strange to me is that when updating the conda environment pkgs pytorch & torchvision update to latest version 1.2 & 0.4 but cudatoolkit downgrades to 10.0 from 10.1, why is that, can’t we use cudatoolkit 10.1 instead of 10.0? Is there some conflict which forces conda to downgrade to cudatoolkit 10.0?

The binaries are shipped with CUDA10.0. Did you build from source with CUDA10.1 or how did you install it?

Basically if you install in a conda env conda install pytorch torchvision cudatoolkit=10.1 -c pytorch it installs pytorch 1.0 & torchvison 0.2 instead of 1.2 & 0.4, but seems to be working fine with cuda 10.1. Now if you do conda update --all it upgrades torch & torchvision to 1.2 & 0.4 equivalently but it downgrades cuda to 10.0. The only reasoning I can find behind this is if pytorch 1.0 binary is built with cuda 10.1? If so then why 1.2 binary is built with cuda 10 instead of 10.1?