-
Notifications
You must be signed in to change notification settings - Fork 74
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
hostOnlyAPITest
fails
#2328
Comments
Maybe you need to set I only need to call |
How does alpaka use CMake to find CUDA ? |
OK, after some testing, it looks like setting What seems to break the |
This seems to fix the issue: diff --git a/cmake/alpakaCommon.cmake b/cmake/alpakaCommon.cmake
index ebaad1b9a80..d4155db366e 100644
--- a/cmake/alpakaCommon.cmake
+++ b/cmake/alpakaCommon.cmake
@@ -542,9 +542,11 @@ if(alpaka_ACC_GPU_CUDA_ENABLE)
endif()
endif()
+ target_link_libraries(alpaka INTERFACE CUDA::cudart)
+
if(NOT alpaka_DISABLE_VENDOR_RNG)
# Use cuRAND random number generators
- target_link_libraries(alpaka INTERFACE CUDA::cudart CUDA::curand)
+ target_link_libraries(alpaka INTERFACE CUDA::curand)
endif()
else()
message(FATAL_ERROR "Optional alpaka dependency CUDA could not be found!") |
Fixed by #2329. |
We use native CMake CUDA language support. |
I've building the alpaka tests with gcc 13 (tested also 12) and CUDA 12.5 (tested also 12.4) on Ubuntu 22.04, with
hostOnlyAPITest
fails to link withCMake tries to link only
/usr/local/cuda-12.5/targets/x86_64-linux/lib/stubs/libcuda.so
, while it should like-L/usr/local/cuda-12.5/targets/x86_64-linux/lib -L/usr/local/cuda-12.5/targets/x86_64-linux/lib/stubs -lcudart -lcuda
.It does work if I change the linker script by hand.
Am I passing the wrong flags to CMake ?
Or ?
The text was updated successfully, but these errors were encountered: