Hi, I am trying to understand the relationship between the libtorch and precomipled pytorch, thus figuring out whether I need Libtorch if I already have pytorch installed using pip.
Does pytorch already contain libtorch? I am asking this because “print(torch.utils.cmake_prefix_path)” gives me “home/weixuan/.local/lib/python3.6/site-packages/torch/share/cmake”, and I can also set this as the CMAKE_PREFIX_PATH and compile my C++ code. Also see the instruction here: Installing C++ Distributions of PyTorch — PyTorch master documentation
So what is the difference between the libtorch and the shared libraries inside the pytorch packages? The purpose of libtorch is for those who do not have pytorch installed on their system and therefore independant of the python?
In addition, it seems that the shared libraries in the pytorch 1.9.0 package are not compiled with cxx11-abi, as pointed out here: SOS! libtorch conflict with ROS! This leads to conflict with ROS package. Is there a way of revolving this without having to compile pytorch from source?  Thanks!