diff --git a/backends/trtllm/CMakeLists.txt b/backends/trtllm/CMakeLists.txt index 0b166e330..552537f0a 100644 --- a/backends/trtllm/CMakeLists.txt +++ b/backends/trtllm/CMakeLists.txt @@ -17,6 +17,7 @@ set(CMAKE_CXX_STANDARD 23) include(FetchContent) include(ExternalProject) +include(CheckCXXCompilerFlag) option(TGI_TRTLLM_BACKEND_BUILD_TESTS "Enable building the unittests suite" OFF) option(TGI_TRTLLM_BACKEND_BUILD_EXAMPLES "Enable building the examples suite" OFF) @@ -33,6 +34,12 @@ include(cmake/json.cmake) include(cmake/spdlog.cmake) include(cmake/trtllm.cmake) +# This attempt to detect if the compiler can emit warning if it can't apply return value optimization from a function +check_cxx_compiler_flag("-Wnrvo" COMPILER_SUPPORT_WARNING_ON_NVRO) +if(${COMPILER_SUPPORT_WARNING_ON_NVRO}) + set(CMAKE_CXX_FLAGS "{CMAKE_CXX_FLAGS} -Wnvro") +endif() + # Let's build TRTLLM as part of CMake add_subdirectory("${trtllm_SOURCE_DIR}/cpp" "${trtllm_SOURCE_DIR}/..") diff --git a/backends/trtllm/tests/infer_test.cpp b/backends/trtllm/tests/infer_test.cpp deleted file mode 100644 index 8520065a7..000000000 --- a/backends/trtllm/tests/infer_test.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// -// Created by mfuntowicz on 7/2/24. -// -#include -#include -#include "../include/backend.h" - -TEST_CASE("Load TRTLLM Engine on the TGI Backend", "[trtllm][engine][load]") { - const auto engines = std::filesystem::path("/home/mfuntowicz/.cache/huggingface/assets/trtllm/0.11.0.dev2024062500/meta-llama--Meta-Llama-3-8B-Instruct/4090/engines/"); - const auto executor = std::filesystem::path("/home/mfuntowicz/Workspace/text-generation-inference/backends/trtllm/cmake-build-debug/cmake-build-debug/_deps/trtllm-src/cpp/tensorrt_llm/executor_worker/executorWorker"); - - spdlog::info("Loading config from: {}", absolute(engines).string()); - huggingface::tgi::backends::TensorRtLlmBackend backend(engines, executor); -}