How to link libs when compiling my own codes based on C API?

Hello,
I’m on Ubuntu 16.04, I installed Pytorch from source, following the instructions here GitHub - pytorch/pytorch: Tensors and Dynamic neural networks in Python with strong GPU acceleration.
I was surprised that there is no libTH.* in /home/$MYUSERNAME/anaconda/lib/python3.6/site-packages/torch/lib
The only files there are :

include/
libcaffe2_gpu.so
libcaffe2_gpu.so.1
libcaffe2.so
libcaffe2.so.1
libnccl.so
libnccl.so.1
libshm.so
THCUNN.h
THNN.h
torch_shm_manager

I had to build torch7 from source like described here #include <TH/TH.h>, and I got a libTH.so
Is there a reason that when building torch from pytorch, it doesn’t build the libTH.* library ?
Is there an option that I missed when building pytorch ?
Thank you.

1 Like