Getting wrong cuda version for PyTorch

/home/preachermanx/.local/lib/python3.6/site-packages/torch/cuda/__init__.py:114: UserWarning: 
    Found GPU0 TITAN V which requires CUDA_VERSION >= 9000 for
     optimal performance and fast startup time, but your PyTorch was compiled
     with CUDA_VERSION 8000. Please install the correct PyTorch binary
     using instructions from http://pytorch.org
    
  warnings.warn(incorrect_binary_warn % (d, name, 9000, CUDA_VERSION))

I implicitly used the following for pytorch install.

pip3 install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl 
pip3 install torchvision

Which was supposed to denote a CUDA 9.1 capable install.

Edited to put the correct install lines used.

This is the binary that work with CUDA 9.1, but do you have it installed? Also if you have an old CUDA 8.0 install, make sure that it won’t be loaded instead of the 9.1.

Yes CUDA 9.1 is fully installed and working. And no, fresh install no CUDA 8.0 ever installed on this image.

Are you sure you don’t have another pytorch for cuda 8.0 installed?

Yes. Neither at the user level or system level.

Your python shell is python 3.6 (from the place where it loads torch in the error message). While you install the package for python 3.5.
So I guess your python 3.6 has an older pytorch binary installed and you reinstall the one for 3.5 (from the wheel name)?

I put the wrong line in this thread, as I just scraped it off the install page without clicking the correct one.

I had actually installed only one pytorch on this box, and it is the correct one. This is does not appear to be a multiple install issue, or legacy install issue. This is a fresh box just built. Can anyone verify that this works on a Titan V or V100 with pytorch?

pip3 install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl

Requirement already satisfied: torch==0.4.0 from http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl in ./.local/lib/python3.6/site-packages (0.4.0)

torch              0.4.0
torchvision        0.2.1
-rwxrwxr-x  1 preachermanx preachermanx 329281896 May  1 14:51 _C.cpython-36m-x86_64-linux-gnu.so

Running into a similar bug installing 0.4 on V100s:

pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp35-cp35m-linux_x86_64.whl 

When I place the model on cuda I get:

Found GPU0 Tesla V100-DGXS-16GB which requires CUDA_VERSION >= 9000 for
     optimal performance and fast startup time, but your PyTorch was compiled
     with CUDA_VERSION 8000. Please install the correct PyTorch binary
     using instructions from http://pytorch.org

It appears there is some issue with the compiled version not playing nicely with the V100 architecture.

Temporary workaround I’m using is to downgrade to 0.3.1:

RUN pip3 install http://download.pytorch.org/whl/cu90/torch-0.3.1-cp35-cp35m-linux_x86_64.whl 
1 Like

Sadly at this point I have abandoned PyTorch for this reason. :frowning:

I am new to python and pytorch, and I got the similar question before.
Then I took the method by:

pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp36-cp36m-linux_x86_64.whl 
pip3 install torchvision

It seems work for me – V100 with pytorch.
Maybe it has already been solved.
But if I try to:

pip3 install torch torchvision

according to the website https://pytorch.org/ for pytorch with cuda 9.0, * cu80/torch-0.4.0-cp36-cp36m-linux_x86_64.whl will still be download, which is quite confusing.

Here is how I sorted my cuda version mismatch with torch and torchvision in Python2.7 through pip.

pip install torch==1.4.0+cu100 torchvision==0.5.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html