I am using PyTorch on XPS 15 with GTX1050Ti and CUDA 10.1
I installed pytorch using the command: conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
However, cuda.is_available() throws False. I dug into the issue and figured out that pytorch can indeed find the right cuda library cudart64_101 but I also get the followng assertion error:
AssertionError(“Torch not compiled with CUDA enabled”)
This seems inconsistent. Can someone help me get this to work?
As I mentioned, I used this command: conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
to install pytorch
EDIT: I removed the local installation of cuda. I removed pytorch, torchvision and cudatoolkit. Then I did a clean install of pytorch using the above command and still the cuda is avaliable throws false. Any suggestions would be helpful
I did that. I went further and uninstalled all python, conda and everything else I couldn’t live without on my computer. Then I installed miniconda and pytorch. per pytorch install instructions, conda did not install the VC runtime, but once I got that on, I was finally able to get a true value from torch.cuda.is_available().