add some more information in CMakeLists.txt to correctly find and install nvrtc wrapper

This commit is contained in:
Morgan Funtowicz 2024-07-22 09:33:38 +00:00
parent 84153702d2
commit 20bcaea54f
2 changed files with 16 additions and 0 deletions

View File

@ -46,7 +46,10 @@ if (${TGI_TRTLLM_BACKEND_BUILD_EXAMPLES})
endif ()
# This install all the artifacts in CMAKE_INSTALL_PREFIX under include/ lib/ bin/ to make easy to link / find it back
message(STATUS "nvrtc ${TRTLLM_NVRTC_LIBRARY_NAME}")
message(STATUS "Installation nvrtc ${TRTLLM_NVRTC_WRAPPER_PATH}")
install(TARGETS tgi_trtllm_backend_impl tensorrt_llm nvinfer_plugin_tensorrt_llm executorWorker)
install(FILES ${TRTLLM_NVRTC_WRAPPER_PATH} TYPE LIB)
#### Unit Tests ####
if (${TGI_TRTLLM_BACKEND_BUILD_TESTS})

View File

@ -30,3 +30,16 @@ fetchcontent_makeavailable(trtllm)
message(STATUS "Found TensorRT-LLM: ${trtllm_SOURCE_DIR}")
execute_process(COMMAND git lfs install WORKING_DIRECTORY "${trtllm_SOURCE_DIR}/")
execute_process(COMMAND git lfs pull WORKING_DIRECTORY "${trtllm_SOURCE_DIR}/")
# TRTLLM use a JIT based *precompiled* library to generate some specific kernels, we are generating the path to this one here
if (WIN32)
set(TRTLLM_NVRTC_LIBRARY_NAME "tensorrt_llm_nvrtc_wrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "nvrtc wrapper library name")
else ()
set(TRTLLM_NVRTC_LIBRARY_NAME "libtensorrt_llm_nvrtc_wrapper${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "nvrtc wrapper library name")
endif ()
set(
TRTLLM_NVRTC_WRAPPER_PATH
"${trtllm_SOURCE_DIR}/cpp/tensorrt_llm/kernels/decoderMaskedMultiheadAttention/decoderXQAImplJIT/nvrtcWrapper/${CMAKE_LIBRARY_ARCHITECTURE}/${TRTLLM_NVRTC_LIBRARY_NAME}"
CACHE INTERNAL "nvrtc wrapper library path"
)