From e15c53ea61f848a0011f83d4b4e747c6eb6b4024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=BDu=C5=BEek?= Date: Tue, 13 May 2025 10:41:36 +0100 Subject: [PATCH] [SYCL][CUDA] Expand search for generated_cuda_meta.h On some systems `CUDA_Toolkit_ROOT` might be emtpy, even though CUDA is properly found in the CMake. This can cause a failed search for `generated_cuda_meta.h`. In that case only a warning is emitted when building `cuda_trace_collector`, but this can fail the `-Werror` build. This patch ensures that if we can find `CUPTI`, we can find this file. --- sycl/tools/sycl-trace/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sycl/tools/sycl-trace/CMakeLists.txt b/sycl/tools/sycl-trace/CMakeLists.txt index 5d11d8a421ba2..1bb26dac05329 100644 --- a/sycl/tools/sycl-trace/CMakeLists.txt +++ b/sycl/tools/sycl-trace/CMakeLists.txt @@ -145,6 +145,8 @@ if(SYCL_BUILD_BACKEND_CUDA) "${CUDAToolkit_ROOT}/extras/CUPTI/include" "${CUDAToolkit_INCLUDE_DIRS}/../extras/CUPTI/include" "${CUDAToolkit_INCLUDE_DIRS}" + "${CUDAToolkit_CUPTI_INCLUDE_DIR}" + "${CUDAToolkit_INCLUDE_DIRS}/../../../extras/CUPTI/include" NO_DEFAULT_PATH) if( EXISTS "${GEN_CUDA_META_H_DIR}/generated_cuda_meta.h" )