Hi,
In my computer I have CUDA 11.1 installed as a requirement for a certain project. In parallel, I’m developing a PyTorch model in a conda environment using cudatoolkit==11.0 (because I couldn’t find pytorch for 11.1), and so far it’s working well. Now I need to export the trained network to use in C++ using LibTorch (which I’m familiar with from another project in another computer), but from the website there’s only the option for CUDA 10.2 and 11.3, so I downloaded the later.
However, when trying to build the C++ app linking the LibTorch libraries I’m getting some compilation errors:
/usr/bin/ld: /opt/libtorch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamUpdateCaptureDependencies@libcudart.so.11.0'
/usr/bin/ld: /opt/libtorch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaStreamGetCaptureInfo_v2@libcudart.so.11.0'
/usr/bin/ld: /opt/libtorch/lib/libtorch_cuda_cu.so: undefined reference to `cudaFreeAsync@libcudart.so.11.0'
/usr/bin/ld: /opt/libtorch/lib/libtorch_cuda_cu.so: undefined reference to `cudaMallocAsync@libcudart.so.11.0'
/usr/bin/ld: /opt/libtorch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaGraphRetainUserObject@libcudart.so.11.0'
/usr/bin/ld: /opt/libtorch/lib/libtorch_cuda_cpp.so: undefined reference to `cudaUserObjectCreate@libcudart.so.11.0
My limited knowledge tells me that it’s because of the mismatch between the used and installed CUDA versions. Is there a way to make it work without changing the installed CUDA 11.1?
Thank you,
Marc