-
Notifications
You must be signed in to change notification settings - Fork 809
[SYCL][E2E] Add CUDA SDK autodetection #16896
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
Conversation
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
| find_package(CUDAToolkit) | ||
|
|
||
| if(CUDAToolkit_FOUND) | ||
| set(CUDA_LIBS_DIR "${CUDAToolkit_LIBRARY_DIR}") |
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.
what overrides what if both this and explicit params are present?
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.
Typically, explicit command line arguments override defaults.
What error do we get if CMake can't find CUDA toolkit and user hasn't set the paths via cmd options? Does it make sense to add diagnostics to CMake files or LIT infrastructure already provides good diagnostics?
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.
previously and still with this pr we get no error, we just dont enable the cuda_dev_kit feature.
the command line lit params will override the default
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.
Doesn't this code override CMake CUDA_INCLUDE/CUDA_LIBS_DIR variables passed via command line?
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.
ah i didnt consider anyone using cmake command line, ill fix it to not do the autodetection if theyre set
Follow-up from #16896 Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
Add autodetection of the CUDA SDK using CMake's builtin
find_package.I didn't remove the LIT params or handling in lit.py as to not break anyone who may want to use a custom install.
Confirmed working here as
Adapters/cuda_queue_priority.cpppassed.