Getting wrong cuda version for PyTorch

username: preachermanx
cooked: <pre><code class="lang-auto">/home/preachermanx/.local/lib/python3.6/site-packages/torch/cuda/__init__.py:114: UserWarning: 
    Found GPU0 TITAN V which requires CUDA_VERSION &gt;= 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))
</code></pre>
<p>I implicitly used the following for pytorch install.</p>
<pre><code class="lang-auto">pip3 install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl 
pip3 install torchvision
</code></pre>
<p>Which was supposed to denote a CUDA 9.1 capable install.</p>
<p>Edited to put the correct install lines used.</p>

username: albanD
cooked: <p>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.</p>

username: preachermanx
cooked: <p>Yes CUDA 9.1 is fully installed and working. And no, fresh install no CUDA 8.0 ever installed on this image.</p>

username: albanD
cooked: <p>Are you sure you don’t have another pytorch for cuda 8.0 installed?</p>

username: preachermanx
cooked: <p>Yes.  Neither at the user level or system level.</p>

username: albanD
cooked: <p>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.<br>
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)?</p>

username: preachermanx
cooked: <p>I put the wrong line in this thread, as I just scraped it off the install page without clicking the correct one.</p>
<p>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?</p>
<pre><code class="lang-auto">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)

</code></pre>
<pre><code class="lang-auto">torch              0.4.0
torchvision        0.2.1
</code></pre>
<pre><code class="lang-auto">-rwxrwxr-x  1 preachermanx preachermanx 329281896 May  1 14:51 _C.cpython-36m-x86_64-linux-gnu.so
</code></pre>

username: radao
cooked: <p>Running into a similar bug installing 0.4 on V100s:</p>
<pre><code class="lang-auto">pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp35-cp35m-linux_x86_64.whl 
</code></pre>
<p>When I place the model on cuda I get:</p>
<pre><code class="lang-auto">Found GPU0 Tesla V100-DGXS-16GB which requires CUDA_VERSION &gt;= 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
</code></pre>
<p>It appears there is some issue with the compiled version not playing nicely with the V100 architecture.</p>
<p>Temporary workaround I’m using is to downgrade to 0.3.1:</p>
<pre><code class="lang-auto">RUN pip3 install http://download.pytorch.org/whl/cu90/torch-0.3.1-cp35-cp35m-linux_x86_64.whl 
</code></pre>

username: preachermanx
cooked: <p>Sadly at this point I have abandoned PyTorch for this reason. <img src="https://discuss.pytorch.org/images/emoji/apple/frowning.png?v=5" title=":frowning:" class="emoji" alt=":frowning:"></p>

username: Alexuan
cooked: <p>I am new to python and pytorch, and I got the similar question before.<br>
Then I took the method by:</p>
<pre><code class="lang-auto">pip3 install http://download.pytorch.org/whl/cu90/torch-0.4.0-cp36-cp36m-linux_x86_64.whl 
pip3 install torchvision
</code></pre>
<p>It seems work for me – V100 with pytorch.<br>
Maybe it has already been solved.<br>
But if I try to:</p>
<pre><code class="lang-auto">pip3 install torch torchvision
</code></pre>
<p>according to the website <a href="https://pytorch.org/" rel="nofollow noopener">https://pytorch.org/</a> for pytorch with cuda 9.0, * <a href="http://download.pytorch.org/whl/cu80/torch-0.4.0-cp36-cp36m-linux_x86_64.whl" rel="nofollow noopener">cu80/torch-0.4.0-cp36-cp36m-linux_x86_64.whl</a> will still be download, which is quite confusing.</p>

username: r2d2oid
cooked: <p>Here is how I sorted my cuda version mismatch with torch and torchvision in Python2.7 through pip.</p>
<p><code>pip install torch==1.4.0+cu100 torchvision==0.5.0+cu100 -f https://download.pytorch.org/whl/torch_stable.html</code></p>