Error Pytorch 0.4.1 Cuda GTX 1080 Ti

Hello everyone,

Today I installed anaconda 5.0.1 (Python 3.6) and Pytorch by command: conda install pytorch -c pytorch. It installs automatically cuda toolkit and pytorch. However, when I run my python program on GPU, I meet this error:

THCudaCheck FAIL file=/opt/conda/conda-bld/pytorch_1532502421238/work/aten/src/THC/THCGeneral.cpp line=663 error=11 : invalid argument

My PC has 4 Cards NVIDIA GTX 1080 Ti. I chose device with device=torch.device(‘cuda:3’). But the problem’s still display. How can I fix this problem?

Did you try restarting your machine ? It worked for people who had recently updated their Nvidia driver.

Reference: https://github.com/pytorch/pytorch/issues/1778#issuecomment-307835545

1 Like

Yes, I’ve already restarted my PC, but there’s no change. Whether cuda 9 accompanied by Pytorch installation is not compatible with NVIDIA Card? How can I install Pytorch with default cuda which has been installed on PC instead of cuda 9 toolkit?

If you want to use default CUDA then installing from source is the only way I know of, because cuda is provided by default with conda/ pip wheel binaries.

1 Like