Is this Pytorch with CUDA 9.0.176 correctly installed?

This environment below does not work because the accuracy is always 0. What are the possible reasons?
What other things should I notice?

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                     <pip>
[conda] torchsummary              1.5.1                     <pip>
[conda] torchvision               0.2.1                     <pip>

If you can create tensors on the GPUs, your install should be correct.
Besides using an older version of PyTorch, your setup seems to be alright.

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?

I forgot to mention that the accuracy is always 0.01/0.02(very close to 0, but not 0).

The accuracy was 0.58 when I tried pytorch with cuda8.0.
Would this problem be related to the NCCL?

Passed:

torch0.4.0 with cuda8.0, nvidia driver version: 396.26
torch0.4.1 with cuda9.0, nvidia driver version: 390.77

Failed:

torch0.4.1 with cuda9.0, nvidia driver version: 396.26

how did you install pytorch.I tried to install it using the following command

conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch

But I was unable to get it properly working.The error message I get is :

AssertionError: Torch not compiled with CUDA enabled

the output of cat /usr/local/cuda/version.txt is CUDA Version 9.0.176
Nvidia smi output shows driver version 384.130

Your local CUDA installation won’t be used, if you install the conda binaries with cudatoolkit.
What’s your use case that you need such an old PyTorch and CUDA version?
I would generally recommend to install the latest version of both libs to avoid already fixed bugs and get new features and utilities.

EDIT: seems to be a double post from here with a solution.

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.
Do you think the latest version of pytorch works on GPU 2080.
I admit that I am not aware of the full CUDA terminology.

I highly doubt this. A GTX 1050 has a compute capability of 6.1 meaning that it should work with all recent CUDA versions.

First update your drivers, then install CUDA 10.2, and then install the correct PyTorch version. You may need to restart your PC in between these steps.