What could I be doing wrong? I am fairly new to c++ and this is quite basic but I have been struggling with this for a couple of days now.
Also where is libtorch.so? I have no folder named /torch/torch in my home directory
TIA
Did you already download libtorch form here (or did you build it manually)? This tutorial would give you a small working example on how to use the C++ API.
I downloaded the nightly build of libtorch and the code is simply building a printing an Identity matrix.
I followed the tutorial to a T(had to make a small change in cuda.cmake though, changes cudnn.h to cudnn_version.h ,probably that does not matter though)
provided the CMAKE_PREFIX_PATH and everything
I downloaded and extracted it to - /home/atharva/torch/libtorch/(LIbraries here)