Skip to content

[UR/offload] Change CUDA package to CUDAToolkit in CMakeLists.txt#22140

Open
Emimendoza wants to merge 1 commit into
intel:syclfrom
Emimendoza:patch-1
Open

[UR/offload] Change CUDA package to CUDAToolkit in CMakeLists.txt#22140
Emimendoza wants to merge 1 commit into
intel:syclfrom
Emimendoza:patch-1

Conversation

@Emimendoza
Copy link
Copy Markdown

FindCUDA has been deprecated (CMP0146)
Also the CUDAToolkit package defines CUDAToolkit_INCLUDE_DIRS, the CUDA package doesn't.

This fixes a bug in which the UR offload adapter will fail to compile if the cuda adapter is not built alongside it since the cuda.h cannot be found (because CUDAToolkit_INCLUDE_DIRS is not set by the CUDA package) when compiling offload/program.cpp. UR_CUDA_ENABLED is still set because CUDA_cuda_driver_LIBRARY is still set by the CUDA package.

FindCUDA has been deprecated  (CMP0146)
Also the CUDAToolkit package defines CUDAToolkit_INCLUDE_DIRS, the CUDA package doesn't. 

This fixes a bug in which the UR offload adapter will fail to compile if the cuda adapter is not built alongside it since the cuda.h cannot be found (because CUDAToolkit_INCLUDE_DIRS is not set by the CUDA package) when compiling offload/program.cpp. UR_CUDA_ENABLED is still set because CUDA_cuda_driver_LIBRARY is still set by the CUDA package.
@Emimendoza Emimendoza requested a review from a team as a code owner May 27, 2026 18:39
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

Successfully merging this pull request may close these issues.

2 participants