Prior to installation, I have Cuda 8.0 and CuDNN 5.1 installed already. In order to be compatible, I install pytorch with
conda install pytorch cuda80 -c soumith
and then remove the redundant cuda80 from conda
It works normally while
torch.backends.cudnn.version() shows '6021'. I double check my LD_LIBRARY_PATH and only libcudnn.so.5.1.10 found