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