-
Notifications
You must be signed in to change notification settings - Fork 153
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
Use FindCUDAToolkit
for cmake versions >= 3.17
#1124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, this is great to see!
I think nvc++ CI fails because it sets -DCUDA_TOOLKIT_ROOT_DIR
to point it to nvc++'s CUDA installation.
I think it might make sense to continue to support CUDA_TOOLKIT_ROOT_DIR
for backwards compatibility even when we use CUDAToolkit
. Our documentation references it, and chances are user installations might also rely on it.
1d83b12
to
8544539
Compare
Now it checks if |
Hello, I think this has caused a problem for me. This seems to make building with a CUDA backend on aarch64 linux fail. Looks like because the Cmake code is looking for the install dirs specific to a x64 machine. Currently working around by cloning the previous merge commit. But this could be an issue for other people developing on aarch64 systems. (Namely NVIDIA Jetson Developer Kits if you're curious about the use case). |
Thanks for reporting. |
similar issue on debian (self-hosted runner) : cmake \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++-15 \
-DCLANG_EXECUTABLE_PATH=/usr/bin/clang++-15 \
-DLLVM_DIR=/usr/lib/llvm-15/cmake \
-DWITH_CUDA_BACKEND=ON -DWITH_ROCM_BACKEND=ON \
-DWITH_LEVEL_ZERO_BACKEND=OFF \
-DCUDA_TOOLKIT_ROOT_DIR=~/opt/cuda \
-DROCM_PATH=/opt/rocm \
-DCMAKE_INSTALL_PREFIX=../OpenSYCL_comp . when running make :
in the docker image CUDA is installed like so :
this bit is the same as the OpenSYCL CI beside the install path |
Thanks, I was able to reproduce with cmake version 3.15. I thought we test with cmake version < 3.17 but maybe we actually don't... Could you try if #1127 fixes it? |
As reported in #1119,
FindCUDA
is deprecated in recent cmake versions.This PR adds our own
FindCUDA
that falls back to cmake'sFindCUDA
for cmake versions < 3.17. For cmake versions >= 3.17 it uses the replacement forFindCUDA
,FindCUDAToolkit
.Fixes #1119