I am working on a Jetson TX2 with the latest Jetpack (4.6.1). I installed Pytorch 1.9.0 using the official wheel file provided by Nvidia and I am trying to compile a small C++ example using LibTorch.
Cmake fails at the linking stage because it reports it cannot find CUDA_cublas_device.
First of all, it’s not clear to me where this include comes from (I have printed the TORCH_LIBRARIES and TORCH_CXX_FLAGS and neither mentions libcublas). Has anyone found a solution to this problem?
At this point I should upgrade CMake to 3.12.2, but I wonder if this is going to break somthing else inside Jetpack 4.6.1: do you have experience with that? I could also cherry pick those two commits but then I would be forced to recompile cmake which is something I wish to avoid if possible.
Solved by changing the file /usr/share/cmake-3.10/Modules/FindCUDA.cmake as detailed in the second link above (simply add AND CUDA_VERSION VERSION_LESS "9.2" at line 960).
OK gotcha, glad you were able to get it working - yes, I’ve upgraded CMake before (but only in containers), so I think that simply editing your FindCUDA.cmake is probably easier for the time being.