I build a cpp extension of PyTorch and it is successfully compiled and installed.
sources = ['src/my_spatialConv.cu',  'src/my_im2col.cu']

if __name__ == '__main__':
    assert torch.cuda.is_available(), 'Please install CUDA for GPU support.'
    setup(
    name='my_conv',
    ext_modules=[CUDAExtension('my_conv', sources)],
    cmdclass={'build_ext': BuildExtension}
    )

However, when I import it via
python -c "import my_conv"

An error appears:
ImportError: /usr/local/lib/python3.6/dist-packages/my_conv-0.0.0-py3.6-linux-x86_64.egg/my_conv.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _THError

The following headers are included in my sources:
#include <TH/TH.h>
#include <THC/THC.h>
#include <ATen/div_rtn.h>

I work on torch-1.1.0, cuda-10.0, and ubuntu-16.04.
What are the probable causes of this error?