I’m following the steps here https://pytorch.org/cppdocs/installing.html
My folder structure is as follows:
The latter files are as described in the link. build is empty and for the libtorch folder I downloaded the gpu version from the main download page.
When I run the following command inside the build folder:
cmake -DCMAKE_PREFIX_PATH=../libtorch ..
I get the following message:
-- Caffe2: CUDA detected: 10.1 -- Caffe2: CUDA nvcc is: /usr/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr -- Caffe2: Header version is: 10.1 -- Found cuDNN: v8.0.4 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so) -- Autodetected CUDA architecture(s): 6.1 -- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61 -- Configuring done CMake Warning at CMakeLists.txt:7 (add_executable): Cannot generate a safe runtime search path for target example-app because files in some directories may conflict with libraries in implicit directories: runtime library [libnvToolsExt.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /usr/local/cuda/lib64 runtime library [libcufft.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /usr/local/cuda/lib64 runtime library [libcurand.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /usr/local/cuda/lib64 Some of these libraries may not be found correctly. -- Generating done -- Build files have been written to: /home/joe/Documents/torchscript/build
I am a complete noob with Linux and c++/cmake. I have looked far and wide but cannot find out how to solve this. I don’t understand enough what information I should provide for help but here’s what I know.
Nvidia-smi and nvcc --version tell me I have CUDA 11.1 and driver version 455.23.05. My LD_LIBRARY_PATH is:
My PATH is:
I installed Pytorch 1.6 with Anaconda if that matters.
I am out of ideas on how to fix this. Any help is welcome!