Doesn't compile with CUDA 12.6.77 using conda environment
Describe the issue
Doesn't compile with CUDA 12.6.77
Environment information:
- OS: Ubuntu 24.10
- Compiler version: gcc 14.2
- CMake version: 3.30.3
- CUDA used for AMGX compilation: CUDA 12.6.77
- MPI version (if applicable):
- AMGX version or commit hash 69e625e99b8788ac7b259c6b217ad4453cc69464
Configuration information
cmake ../
Compilation information
Issue information
cmake ../ runs fine, until it returns an error:
CMake Error at CMakeLists.txt:272 (target_link_libraries): Target "amgx" links to:
CUDA::nvToolsExt
but the target was not found. Possible reasons include:
- There is a typo in the target name.
- A find_package call is missing for an IMPORTED target.
- An ALIAS target is missing.
CMake Error at CMakeLists.txt:273 (target_link_libraries): Target "amgxsh" links to:
CUDA::nvToolsExt
but the target was not found. Possible reasons include:
- There is a typo in the target name.
- A find_package call is missing for an IMPORTED target.
- An ALIAS target is missing.
Additional context Compiling in Conda environment. Compiles fine when I install older CUDA 11.7. Doesn't work with the cuda version 12.6 from: conda install cuda -c nvidia
Im not too familar with cuda, but nvToolsExt seems to be modified in CUDA 12 to be header only and not linkable and changed to nvtx3:
https://gitlab.kitware.com/cmake/cmake/-/issues/22893
https://github.com/pytorch/pytorch/issues/116242
Hi @Maccy-Z
I see linked issues are all referring Windows, just wanted to confirm if you experienced this on Ubuntu.
I can't repro it on Linux + CMake 3.20 + CUDA 12.6, it seems on linux CUDA has both old nvtx + lib and nvtx3, and old nvtx is being used.
Yes this is on Ubuntu
However, Im using it in a conda env, is probably why then. The conda package only has the newer version and I don't have cuda installed on the main system.
@Maccy-Z In general - we should support conda environment, so we should chase it down. Let me leave this issue open for future reference.