From 3cee47e2bb60f72abc4a741fd7aa5dad2890ceec Mon Sep 17 00:00:00 2001 From: Nicolas Miller Date: Thu, 27 Feb 2025 17:33:06 +0000 Subject: [PATCH] [SYCL][CUDA] Fix adapter cupti linking `cupti` shouldn't be linked against the adapter, when it is the adapter is unusable if the library is not available, instead of just the tracing being affected. The code is already setup to dynamically load `cupti` so this can just be removed. --- unified-runtime/source/adapters/cuda/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unified-runtime/source/adapters/cuda/CMakeLists.txt b/unified-runtime/source/adapters/cuda/CMakeLists.txt index b6b153a5d8fdb..74a43f44437ab 100644 --- a/unified-runtime/source/adapters/cuda/CMakeLists.txt +++ b/unified-runtime/source/adapters/cuda/CMakeLists.txt @@ -109,8 +109,8 @@ if (UR_ENABLE_TRACING) endif() if (CUDA_cupti_LIBRARY) + # cupti is dynamically loaded so the adapter still works if it's not available target_compile_definitions("ur_adapter_cuda" PRIVATE CUPTI_LIB_PATH="${CUDA_cupti_LIBRARY}") - list(APPEND EXTRA_LIBS ${CUDA_cupti_LIBRARY}) endif() target_link_libraries(${TARGET_NAME} PRIVATE