From 4321c3755e27ec0804fae8b09ff898ccc16a3484 Mon Sep 17 00:00:00 2001 From: Francesco Petrini Date: Fri, 25 Oct 2024 11:24:13 -0700 Subject: [PATCH] Revert "Remove unnecessary linking of CUDA Runtime library (#798)" This reverts commit 51a5e91a83e71689b7d83150cf1de5e10d9438fb. --- src/c++/library/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/c++/library/CMakeLists.txt b/src/c++/library/CMakeLists.txt index 7fa1ca9f7..b5656bfaf 100644 --- a/src/c++/library/CMakeLists.txt +++ b/src/c++/library/CMakeLists.txt @@ -291,8 +291,10 @@ if(TRITON_ENABLE_CC_GRPC) endif() # TRITON_ENABLE_GPU if(TRITON_ENABLE_GPU) - target_include_directories(${_client_target} - PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) + target_link_libraries( + ${_client_target} + PUBLIC CUDA::cudart + ) endif() # TRITON_ENABLE_GPU endforeach() @@ -475,8 +477,10 @@ if(TRITON_ENABLE_CC_HTTP) endif() # TRITON_ENABLE_GPU if(TRITON_ENABLE_GPU) - target_include_directories(${_client_target} - PUBLIC ${CUDAToolkit_INCLUDE_DIRS}) + target_link_libraries( + ${_client_target} + PUBLIC CUDA::cudart + ) endif() # TRITON_ENABLE_GPU if(${TRITON_ENABLE_ZLIB})