I’m getting CMake error while doing cmake -DCMAKE_PREFIX_PATH=…/…/libtorch … . Yesterday I followed the same step, which is on Pytorch. I’m able to build it successfully on my laptop, but when I’m doing the same I’m getting an error like
Have you checked and made sure that there is a libtorch installation at ../../libtorch? Also another thing to try is to remove the ~/example-app/build folder, recreate it again and then rerun the steps.
I think error could be because of cuda. As same program without CUDA Libtorch runs perfectly well(left terminal), whereas with CUDA Libtorch throws error(right terminal). Any help would be welcome.
Thanks for debugging further. I think the answer to the previous problem is that we should use cmake -DCMAKE_PREFIX_PATH=/absolute/path/to/libtorch .. instead of cmake -DCMAKE_PREFIX_PATH=relative/path/to/libtorch ... Putting it here so that other users could see the solution.