misc(backend): let's actually cache things now
This commit is contained in:
parent
6da97ae922
commit
6790cd6804
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue