From 4272b8cf5114b75077ead17ac1d8480658051444 Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Wed, 10 Jul 2024 13:48:44 +0000 Subject: [PATCH] correctly tell cmake to build dependent tensorrt-llm required libraries --- backends/trtllm/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backends/trtllm/CMakeLists.txt b/backends/trtllm/CMakeLists.txt index ab06175f..5bb61568 100644 --- a/backends/trtllm/CMakeLists.txt +++ b/backends/trtllm/CMakeLists.txt @@ -17,17 +17,20 @@ include(cmake/json.cmake) include(cmake/spdlog.cmake) include(cmake/trtllm.cmake) +add_subdirectory("${trtllm_SOURCE_DIR}/cpp" "${trtllm_SOURCE_DIR}/..") + find_package(CUDAToolkit REQUIRED COMPONENTS CUDA::nvml) # TGI TRTLLM Backend definition add_library(tgi_trtllm_backend_impl STATIC include/backend.h lib/backend.cpp) +include_directories(${TGI_TRTLLM_BACKEND_TRT_INCLUDE_DIR}) target_include_directories(tgi_trtllm_backend_impl PRIVATE $ $ ) -include_directories(${TGI_TRTLLM_BACKEND_TRT_INCLUDE_DIR}) -target_link_libraries(tgi_trtllm_backend_impl PUBLIC tensorrt_llm nvinfer_plugin_tensorrt_llm) -target_link_libraries(tgi_trtllm_backend_impl PRIVATE nlohmann_json::nlohmann_json spdlog::spdlog CUDA::nvml) +target_include_directories(tgi_trtllm_backend_impl PUBLIC "${trtllm_SOURCE_DIR}/cpp/include") +target_link_libraries(tgi_trtllm_backend_impl PRIVATE tensorrt_llm nvinfer_plugin_tensorrt_llm CUDA::nvml) +target_link_libraries(tgi_trtllm_backend_impl PUBLIC nlohmann_json::nlohmann_json spdlog::spdlog) #### Unit Tests ####