Skip to content

Commit 6790cd6

Browse files
committed
misc(backend): let's actually cache things now
1 parent 6da97ae commit 6790cd6

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.github/workflows/build_trtllm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Extract TensorRT-LLM version
3434
run: |
3535
echo "TENSORRT_LLM_VERSION=$(grep -oP '([a-z,0-9]{40})' $GITHUB_WORKSPACE/backends/trtllm/cmake/trtllm.cmake)" >> $GITHUB_ENV
36-
echo "TensorRT-LLM version: $TENSORRT_LLM_VERSION"
36+
echo "TensorRT-LLM version: ${{ env.TENSORRT_LLM_VERSION }}"
3737
3838
- name: "Configure AWS Credentials"
3939
id: aws-creds

Dockerfile_trtllm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,14 @@ ENV IS_GHA_BUILD ${is_gha_build}
9191
ENV LD_LIBRARY_PATH="/usr/local/mpi/lib:$LD_LIBRARY_PATH"
9292
ENV PKG_CONFIG_PATH="/usr/local/mpi/lib/pkgconfig:$PKG_CONFIG_PATH"
9393
ENV USE_LLD_LINKER=ON
94+
ENV RUSTC_WRAPPER=sccache
9495

9596
COPY . .
9697
COPY --from=trt-builder /usr/local/tensorrt /usr/local/tensorrt
9798
COPY --from=mpi-builder /usr/local/mpi /usr/local/mpi
9899
RUN mkdir $TGI_INSTALL_PREFIX && mkdir "$TGI_INSTALL_PREFIX/include" && mkdir "$TGI_INSTALL_PREFIX/lib" && \
99100
python3 backends/trtllm/scripts/setup_sccache.py --is-gha-build ${IS_GHA_BUILD} && \
100-
RUSTC_WRAPPER=sccache CMAKE_INSTALL_PREFIX=$TGI_INSTALL_PREFIX cargo build --profile ${build_type} --package text-generation-backends-trtllm --bin text-generation-backends-trtllm && \
101+
CMAKE_INSTALL_PREFIX=$TGI_INSTALL_PREFIX cargo build --profile ${build_type} --package text-generation-backends-trtllm --bin text-generation-backends-trtllm && \
101102
sccache --show-stats
102103

103104
FROM nvidia/cuda:12.6.3-cudnn-runtime-ubuntu24.04 AS runtime

backends/trtllm/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ fn build_backend(is_debug: bool, opt_level: &str, out_dir: &PathBuf) -> (PathBuf
119119

120120
if let Some(wrapper) = option_env!("RUSTC_WRAPPER") {
121121
if wrapper == "sccache" {
122-
config.define("CMAKE_CXX_COMPILER_LAUNCHER", "sccache");
122+
println!("cargo:warning=Using caching tool: {wrapper}");
123+
config.define("CMAKE_CXX_COMPILER_LAUNCHER", wrapper);
123124
}
124125
}
125126

0 commit comments

Comments
 (0)