From 68f5466c861fce3e42f641a41191d3b4a31dadef Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Thu, 12 Dec 2024 14:52:12 +0100 Subject: [PATCH] misc(ci): add debug profile --- .github/workflows/build_trtllm.yaml | 2 +- Cargo.toml | 3 --- backends/trtllm/CMakeLists.txt | 10 +++++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_trtllm.yaml b/.github/workflows/build_trtllm.yaml index 1f67bca0ecd..3fe11401b99 100644 --- a/.github/workflows/build_trtllm.yaml +++ b/.github/workflows/build_trtllm.yaml @@ -55,7 +55,7 @@ jobs: load: true platforms: 'linux/amd64' build-args: | - BUILD_TYPE=debug + BUILD_TYPE=dev SCCACHE_REGION: us-east-1 SCCACHE_S3_USE_SSL: false SCCACHE_S3_KEY_PREFIX: trtllm diff --git a/Cargo.toml b/Cargo.toml index 7d76b285bc8..2a74d59e457 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,9 +35,6 @@ minijinja = { version = "2.2.0", features = ["json"] } minijinja-contrib = { version = "2.0.2", features = ["pycompat"] } pyo3 = { version = "0.22.2", features = ["auto-initialize"] } -[profile.debug] -opt-level = 0 - [profile.release] incremental = true diff --git a/backends/trtllm/CMakeLists.txt b/backends/trtllm/CMakeLists.txt index faf4be57c6a..24c8dc7f109 100644 --- a/backends/trtllm/CMakeLists.txt +++ b/backends/trtllm/CMakeLists.txt @@ -96,7 +96,11 @@ if (${TGI_TRTLLM_BACKEND_BUILD_TESTS}) ) FetchContent_MakeAvailable(Catch2) + cmake_path(GET TRTLLM_NVRTC_WRAPPER_LIBRARY_PATH PARENT_PATH TRTLLM_NVRTC_WRAPPER_PARENT_LIBRARY_PATH) + message(STATUS "Adding linking path: ${TRTLLM_NVRTC_WRAPPER_PARENT_LIBRARY_PATH}") + add_executable(tgi_trtllm_backend_tests tests/test_hardware.cpp tests/test_backend.cpp) + target_link_directories(tgi_trtllm_backend_tests PRIVATE "${TRTLLM_NVRTC_WRAPPER_PARENT_LIBRARY_PATH}") target_include_directories(tgi_trtllm_backend_tests PUBLIC "${trtllm_SOURCE_DIR}/cpp/include") target_include_directories(tgi_trtllm_backend_tests PUBLIC "csrc/") target_link_libraries(tgi_trtllm_backend_tests PRIVATE ${TRTLLM_LIBS} CUDA::cudart CUDA::nvml) @@ -104,9 +108,9 @@ if (${TGI_TRTLLM_BACKEND_BUILD_TESTS}) target_link_libraries(tgi_trtllm_backend_tests PRIVATE tensorrt_llm nvinfer_plugin_tensorrt_llm tensorrt_llm_nvrtc_wrapper) if (CMAKE_BUILD_TYPE MATCHES "Debug") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=undefined") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined") - target_link_options(tgi_trtllm_backend_tests BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address) + # set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fsanitize=undefined") + # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fsanitize=undefined") + # target_link_options(tgi_trtllm_backend_tests BEFORE PUBLIC -fsanitize=undefined PUBLIC -fsanitize=address) endif () list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)