From 6790cd6804801e3b25ee44dbd1bfa05f3cf385b0 Mon Sep 17 00:00:00 2001 From: Morgan Funtowicz Date: Fri, 20 Dec 2024 21:47:03 +0100 Subject: [PATCH] misc(backend): let's actually cache things now --- .github/workflows/build_trtllm.yaml | 2 +- Dockerfile_trtllm | 3 ++- backends/trtllm/build.rs | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_trtllm.yaml b/.github/workflows/build_trtllm.yaml index 421d37ac..19fc4bfc 100644 --- a/.github/workflows/build_trtllm.yaml +++ b/.github/workflows/build_trtllm.yaml @@ -33,7 +33,7 @@ jobs: - name: Extract TensorRT-LLM version run: | echo "TENSORRT_LLM_VERSION=$(grep -oP '([a-z,0-9]{40})' $GITHUB_WORKSPACE/backends/trtllm/cmake/trtllm.cmake)" >> $GITHUB_ENV - echo "TensorRT-LLM version: $TENSORRT_LLM_VERSION" + echo "TensorRT-LLM version: ${{ env.TENSORRT_LLM_VERSION }}" - name: "Configure AWS Credentials" id: aws-creds diff --git a/Dockerfile_trtllm b/Dockerfile_trtllm index 54096003..af956748 100644 --- a/Dockerfile_trtllm +++ b/Dockerfile_trtllm @@ -91,13 +91,14 @@ ENV IS_GHA_BUILD ${is_gha_build} ENV LD_LIBRARY_PATH="/usr/local/mpi/lib:$LD_LIBRARY_PATH" ENV PKG_CONFIG_PATH="/usr/local/mpi/lib/pkgconfig:$PKG_CONFIG_PATH" ENV USE_LLD_LINKER=ON +ENV RUSTC_WRAPPER=sccache COPY . . COPY --from=trt-builder /usr/local/tensorrt /usr/local/tensorrt COPY --from=mpi-builder /usr/local/mpi /usr/local/mpi RUN mkdir $TGI_INSTALL_PREFIX && mkdir "$TGI_INSTALL_PREFIX/include" && mkdir "$TGI_INSTALL_PREFIX/lib" && \ python3 backends/trtllm/scripts/setup_sccache.py --is-gha-build ${IS_GHA_BUILD} && \ - RUSTC_WRAPPER=sccache CMAKE_INSTALL_PREFIX=$TGI_INSTALL_PREFIX cargo build --profile ${build_type} --package text-generation-backends-trtllm --bin text-generation-backends-trtllm && \ + CMAKE_INSTALL_PREFIX=$TGI_INSTALL_PREFIX cargo build --profile ${build_type} --package text-generation-backends-trtllm --bin text-generation-backends-trtllm && \ sccache --show-stats FROM nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04 AS runtime diff --git a/backends/trtllm/build.rs b/backends/trtllm/build.rs index bc48c82e..4f3961d1 100644 --- a/backends/trtllm/build.rs +++ b/backends/trtllm/build.rs @@ -119,7 +119,8 @@ fn build_backend(is_debug: bool, opt_level: &str, out_dir: &PathBuf) -> (PathBuf if let Some(wrapper) = option_env!("RUSTC_WRAPPER") { if wrapper == "sccache" { - config.define("CMAKE_CXX_COMPILER_LAUNCHER", "sccache"); + println!("cargo:warning=Using caching tool: {wrapper}"); + config.define("CMAKE_CXX_COMPILER_LAUNCHER", wrapper); } }