Failed to find nvToolsExt

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:

  1. Confirm that the nvToolsExt library is indeed present in your CUDA 12.1 installation. Check the C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/lib64 directory for the library file (nvToolsExt64_1.lib on Windows).

  2. 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.

  3. 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 the find_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.

  4. 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.

1 Like