Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues linking while linking CUDA after RTK v2.3.0 CMake refactoring #449

Open
GabrieleBelotti opened this issue Oct 25, 2021 · 3 comments

Comments

@GabrieleBelotti
Copy link
Contributor

Issue presented when fast-forwarding to tag v2.3.0 (from #413 merge) and regenerating the CMake project. In particular, while setting up the project for Visual studio 2017 I get the following error:

Could not find a package configuration file provided by "CUDAToolkit" with any of the following names: CUDAToolkitConfig.cmake
cudatoolkit-config.cmake

I'm using CUDA v10.1 and linking against ITK v5.2 using CMake v3.14.3.

I suppose this may be due to my CMake version being outdated since FINDCudaToolkit is referenced from CMake v3.17. onwards.

@SimonRit
Copy link
Collaborator

In theory you should have seen a warning CUDAToolkit not found (available since CMake v3.17). RTK_USE_CUDA set to OFF. Indeed, we no longer support cmake versions older than 3.17 with Cuda...

@GabrieleBelotti
Copy link
Contributor Author

In theory you should have seen a warning CUDAToolkit not found (available since CMake v3.17). RTK_USE_CUDA set to OFF. Indeed, we no longer support cmake versions older than 3.17 with Cuda...

Yes! now I was able to replicate the warning popping up. It wasn't showing until I was setting CMAKE_CUDA_COMPILER to my bin/nvcc path.
So it's surely working as intended, but I don't get the warning if I set RTK_USE_CUDA to true and configure. In that case I simply get :
CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:285 (message): No CUDA toolset found. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID) itk-module-init.cmake:36 (enable_language) CMakeLists.txt:109 (include)

I feel like this is particularly inconsequential, sorry for wasting your time!

@GabrieleBelotti
Copy link
Contributor Author

In theory you should have seen a warning CUDAToolkit not found (available since CMake v3.17). RTK_USE_CUDA set to OFF. Indeed, we no longer support cmake versions older than 3.17 with Cuda...

Yes! now I was able to replicate the warning popping up. It wasn't showing until I was setting CMAKE_CUDA_COMPILER to my bin/nvcc path. So it's surely working as intended, but I don't get the warning if I set RTK_USE_CUDA to true and configure. In that case I simply get : CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:285 (message): No CUDA toolset found. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCompilerId.cmake:31 (CMAKE_DETERMINE_COMPILER_ID_BUILD) C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCUDACompiler.cmake:72 (CMAKE_DETERMINE_COMPILER_ID) itk-module-init.cmake:36 (enable_language) CMakeLists.txt:109 (include)

I feel like this is particularly inconsequential, sorry for wasting your time!

I updated CMake to the latest release, but it seems that I still have issues with the CUDA toolkit identification:

CMake Error at C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:463 (message): No CUDA toolset found. Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:6 (CMAKE_DETERMINE_COMPILER_ID_BUILD) C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake:48 (__determine_compiler_id_test) C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeDetermineCUDACompiler.cmake:298 (CMAKE_DETERMINE_COMPILER_ID) itk-module-init.cmake:36 (enable_language) CMakeLists.txt:109 (include)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants