Hello Max,
The error message you are encountering indicates that CMake is unable to find the nvToolsExt
library, which is typically provided by the NVIDIA CUDA Toolkit. This library is used for GPU profiling and debugging.
The issue could be related to the version mismatch between your CUDA installation and the libtorch Preview version you are trying to use. It’s possible that the libtorch Preview version you have is expecting a different version of nvToolsExt
than the one provided by CUDA 12.1.
To address this issue, you can try the following steps:
-
Confirm that the
nvToolsExt
library is indeed present in your CUDA 12.1 installation. Check theC:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib64
directory for the library file (nvToolsExt64_1.lib
on Windows). -
Ensure that the CUDA 12.1 installation directory is correctly set in your system’s environment variables (
PATH
variable) or in the CMake configuration. This ensures that CMake can locate the necessary CUDA files. -
If the library is present and the environment variables are correctly set, you can try manually adding the path to the
nvToolsExt
library in your CMakeLists.txt file. Add the following line before thefind_package(Torch REQUIRED)
line:link_directories("C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib64")
Replace the path with the correct location of the
lib64
directory on your system. -
If the above steps do not resolve the issue, it’s possible that there is an incompatibility between the libtorch Preview version and CUDA 12.1. In that case, you might need to wait for a newer libtorch Preview version that is compatible with CUDA 12.1 or consider downgrading your CUDA installation to a version that is compatible with the libtorch Preview version you want to use.
I hope this helps! Let me know if you have any further questions.