Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ccache with sccache #963

Merged
merged 5 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions ci/cpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -e
export PATH=/opt/conda/bin:/usr/local/cuda/bin:$PATH
export PARALLEL_LEVEL=${PARALLEL_LEVEL:-4}
export CMAKE_GENERATOR="Ninja"
export CONDA_BLD_DIR="$WORKSPACE/.conda-bld"

# Set home to the job's workspace
export HOME=$WORKSPACE
Expand All @@ -25,6 +26,11 @@ if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then
export VERSION_SUFFIX=`date +%y%m%d`
fi

# Set sccache as CMake compiler
export CMAKE_CUDA_COMPILER_LAUNCHER="sccache"
export CMAKE_CXX_COMPILER_LAUNCHER="sccache"
export CMAKE_C_COMPILER_LAUNCHER="sccache"

################################################################################
# SETUP - Check environment
################################################################################
Expand Down Expand Up @@ -63,18 +69,23 @@ if [[ "$BUILD_LIBRMM" == "1" ]]; then
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build conda/recipes/librmm --python=$PYTHON
else
gpuci_conda_retry build --dirty --no-remove-work-dir conda/recipes/librmm
gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir conda/recipes/librmm
mkdir -p ${CONDA_BLD_DIR}/librmm
mv ${CONDA_BLD_DIR}/work/ ${CONDA_BLD_DIR}/librmm/work
fi
gpuci_logger "sccache stats"
sccache --show-stats
fi

if [[ "$BUILD_RMM" == "1" ]]; then
gpuci_logger "Build conda pkg for rmm"
if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_conda_retry build conda/recipes/rmm --python=$PYTHON
else
gpuci_conda_retry build --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ conda/recipes/rmm

gpuci_conda_retry build --no-build-id --croot ${CONDA_BLD_DIR} --dirty --no-remove-work-dir \
-c $WORKSPACE/ci/artifacts/rmm/cpu/.conda-bld/ conda/recipes/rmm
mkdir -p ${CONDA_BLD_DIR}/rmm
mv ${CONDA_BLD_DIR}/work/ ${CONDA_BLD_DIR}/rmm/work
fi
fi

Expand Down
9 changes: 7 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export GIT_DESCRIBE_TAG=`git describe --abbrev=0 --tags`
export GIT_DESCRIBE_NUMBER=`git rev-list ${GIT_DESCRIBE_TAG}..HEAD --count`
export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'`

# Set sccache as CMake compiler
export CMAKE_CUDA_COMPILER_LAUNCHER="sccache"
export CMAKE_CXX_COMPILER_LAUNCHER="sccache"
export CMAKE_C_COMPILER_LAUNCHER="sccache"

################################################################################
# SETUP - Check environment
################################################################################
Expand Down Expand Up @@ -113,11 +118,11 @@ else

cd $WORKSPACE/python

CONDA_FILE=`find $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ -name "librmm*.tar.bz2"`
CONDA_FILE=`find $WORKSPACE/ci/artifacts/rmm/cpu/.conda-bld/ -name "librmm*.tar.bz2"`
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
gpuci_logger "Installing $CONDA_FILE"
gpuci_mamba_retry install -c $WORKSPACE/ci/artifacts/rmm/cpu/conda-bld/ "$CONDA_FILE"
gpuci_mamba_retry install -c $WORKSPACE/ci/artifacts/rmm/cpu/.conda-bld/ "$CONDA_FILE"

export LIBRMM_BUILD_DIR="$WORKSPACE/ci/artifacts/rmm/cpu/conda_work/build"

Expand Down
8 changes: 5 additions & 3 deletions conda/recipes/librmm/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ build:
- CUDAHOSTCXX
- PARALLEL_LEVEL
- VERSION_SUFFIX
- CCACHE_DIR
- CCACHE_NOHASHDIR
- CCACHE_COMPILERCHECK
- CMAKE_GENERATOR
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER
- PROJECT_FLASH
- SCCACHE_S3_KEY_PREFIX=librmm-aarch64 # [aarch64]
- SCCACHE_S3_KEY_PREFIX=librmm-linux64 # [linux64]
- SCCACHE_BUCKET=rapids-sccache
- SCCACHE_REGION=us-west-2
- SCCACHE_IDLE_TIMEOUT=32768
run_exports:
- {{ pin_subpackage("librmm", max_pin="x.x") }}

Expand Down