Is this Pytorch with CUDA 9.0.176 correctly installed?

fangyh: <p>This environment below does not work because the accuracy is always 0. What are the possible reasons?<br>
What other things should I notice?</p>
<pre><code class="lang-auto">PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: 9.0.176

OS: Ubuntu 16.04.5 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
CMake version: version 3.5.1

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 9.0.176
GPU models and configuration:
GPU 0: TITAN Xp
GPU 1: TITAN Xp
GPU 2: TITAN Xp
GPU 3: TITAN Xp
GPU 4: TITAN Xp
GPU 5: TITAN Xp
GPU 6: TITAN Xp
GPU 7: TITAN Xp

Nvidia driver version: 396.54
cuDNN version: Probably one of the following:
/usr/local/cuda-9.0/lib64/libcudnn.so.7.3.0
/usr/local/cuda-9.0/lib64/libcudnn_static.a
/usr/local/cuda-9.2/lib64/libcudnn.so.7.2.1
/usr/local/cuda-9.2/lib64/libcudnn_static.a

Versions of relevant libraries:
[pip] Could not collect
[conda] torch                     0.4.1                     &lt;pip&gt;
[conda] torchsummary              1.5.1                     &lt;pip&gt;
[conda] torchvision               0.2.1                     &lt;pip&gt;
</code></pre>

ptrblck: <p>If you can create tensors on the GPUs, your install should be correct.<br>
Besides using an older version of PyTorch, your setup seems to be alright.</p>
<p>What do you mean by “accuracy is always 0”? If you are referring to some model performance, I would suggest to have a look at your training code or why do you think your installation might be the problem?</p>

fangyh: <p>I forgot to mention that the accuracy is always 0.01/0.02(very close to 0, but not 0).</p>
<p>The accuracy was 0.58 when I tried pytorch with cuda8.0.<br>
Would this problem be related to the NCCL?</p>

fangyh: <p>Passed:</p>
<blockquote>
<p>torch0.4.0 with cuda8.0, nvidia driver version: 396.26<br>
torch0.4.1 with cuda9.0, nvidia driver version: 390.77</p>
</blockquote>
<p>Failed:</p>
<blockquote>
<p>torch0.4.1 with cuda9.0, nvidia driver version: 396.26</p>
</blockquote>

sparshgarg23: <p>how did you install pytorch.I tried to install it using the following command</p>
<pre><code class="lang-auto">conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
</code></pre>
<p>But I was  unable to  get it properly working.The error message I get is :</p>
<pre><code class="lang-auto">AssertionError: Torch not compiled with CUDA enabled

</code></pre>
<p>the output of cat /usr/local/cuda/version.txt is CUDA Version 9.0.176<br>
Nvidia smi output shows driver  version 384.130</p>

ptrblck: <p>Your local CUDA installation won’t be used, if you install the conda binaries with <code>cudatoolkit</code>.<br>
What’s your use case that you need such an old PyTorch and CUDA version?<br>
I would generally recommend to install the latest version of both libs to avoid already fixed bugs and get new features and utilities.</p>
<p>EDIT: seems to be a double post from <a href="https://discuss.pytorch.org/t/trying-to-install-pytorch-with-gpu/96480/6">here</a> with a solution.</p>

sparshgarg23: <p>Unfortunately,the people in my team only gave me a system which has GPU1050.After a lot of digging,I found out that only a specific version of CUDA works on it,which is CUDA 9.<br>
Do you think the latest version of pytorch works on GPU 2080.<br>
I admit that I am not aware of the full CUDA terminology.</p>

BramVanroy: <p>I highly doubt this. A GTX 1050 has a compute capability of 6.1 meaning that it should work with all recent CUDA versions.</p>
<p>First update <a href="https://www.nvidia.com/en-us/geforce/drivers/" rel="nofollow noopener">your drivers</a>, then install <a href="https://developer.nvidia.com/cuda-10.2-download-archive" rel="nofollow noopener">CUDA 10.2</a>, and then install the correct <a href="https://pytorch.org/get-started/locally/" rel="nofollow noopener">PyTorch</a> version. You may need to restart your PC in between these steps.</p>