Install pytorch from source compiling error

Hi, Install pytorch from the latest source package gives me the following error like

RuntimeWarning: Parent module 'torch._thnn' not found while handling absolute import
  import os

and

torch/csrc/nn/THNN_generic.cpp:6788:14: error: ‘THCudaHalfTensor’ was not declared in this scope
             (THCudaHalfTensor*)arg_input->cdata(),


Currently, my cuda version is 7.5 on ubuntu 14.04, any ideas?

After checking setup.py, I find that they use CUDA_HOME vairables. So i define CUDA_HOME Variable to point to the cuda7.5 folder in my .bashrc file(Previously I define it to my PATH=/usr/local/cuda-7.5/bin:$PATH and LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64:$LD_LIBRARY_PATH ), I solved my problems.