Skip to content

Commit

Permalink
Replace ccache with sccache (#471)
Browse files Browse the repository at this point in the history
This PR replaces `ccache` with `sccache`.

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Jake Awe (https://github.com/AyodeAwe)
  - Ray Douglass (https://github.com/raydouglass)

URL: #471
  • Loading branch information
ajschmidt8 authored Feb 3, 2022
1 parent 7568d4a commit 7fb0158
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 14 deletions.
15 changes: 13 additions & 2 deletions ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,22 @@ export CUDA_REL=${CUDA_VERSION%.*}
# Set home to the job's workspace
export HOME="$WORKSPACE"

# Parse git describei
# Parse git describe
cd "$WORKSPACE"
export GIT_DESCRIBE_TAG=`git describe --tags`
export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'`

# ucx-py version
export UCX_PY_VERSION='0.25.*'

export CMAKE_CUDA_COMPILER_LAUNCHER="sccache"
export CMAKE_CXX_COMPILER_LAUNCHER="sccache"
export CMAKE_C_COMPILER_LAUNCHER="sccache"
export SCCACHE_S3_KEY_PREFIX="libraft-$(uname -m)"
export SCCACHE_BUCKET="rapids-sccache"
export SCCACHE_REGION="us-west-2"
export SCCACHE_IDLE_TIMEOUT="32768"

################################################################################
# SETUP - Check environment
################################################################################
Expand All @@ -45,7 +53,7 @@ gpuci_logger "Activate conda env"
. /opt/conda/etc/profile.d/conda.sh
conda activate rapids
gpuci_logger "Installing packages needed for RAFT"
gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \
gpuci_mamba_retry install -y -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \
"cudatoolkit=${CUDA_REL}" \
"libcusolver>=11.2.1" \
"cudf=${MINOR_VERSION}" \
Expand Down Expand Up @@ -92,6 +100,9 @@ else
"$WORKSPACE/build.sh" libraft pyraft libraft -v --compile-libs
fi

gpuci_logger "sccache stats"
sccache --show-stats

gpuci_logger "Building docs"
"$WORKSPACE/build.sh" docs -v

Expand Down
10 changes: 6 additions & 4 deletions conda/recipes/libraft_distance/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ build:
- PARALLEL_LEVEL
- VERSION_SUFFIX
- PROJECT_FLASH
- CCACHE_DIR
- CCACHE_NOHASHDIR
- CCACHE_COMPILERCHECK
- CMAKE_GENERATOR
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER
- SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64]
- SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64]
- SCCACHE_BUCKET=rapids-sccache
- SCCACHE_REGION=us-west-2
- SCCACHE_IDLE_TIMEOUT=32768

requirements:
build:
Expand All @@ -54,4 +56,4 @@ about:
home: http://rapids.ai/
license: Apache-2.0
# license_file: LICENSE
summary: libraft-distance library
summary: libraft-distance library
10 changes: 6 additions & 4 deletions conda/recipes/libraft_headers/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ build:
- PARALLEL_LEVEL
- VERSION_SUFFIX
- PROJECT_FLASH
- CCACHE_DIR
- CCACHE_NOHASHDIR
- CCACHE_COMPILERCHECK
- CMAKE_GENERATOR
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER
- SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64]
- SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64]
- SCCACHE_BUCKET=rapids-sccache
- SCCACHE_REGION=us-west-2
- SCCACHE_IDLE_TIMEOUT=32768

requirements:
build:
Expand All @@ -53,4 +55,4 @@ about:
home: http://rapids.ai/
license: Apache-2.0
# license_file: LICENSE
summary: libraft-headers library
summary: libraft-headers library
10 changes: 6 additions & 4 deletions conda/recipes/libraft_nn/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ build:
- PARALLEL_LEVEL
- VERSION_SUFFIX
- PROJECT_FLASH
- CCACHE_DIR
- CCACHE_NOHASHDIR
- CCACHE_COMPILERCHECK
- CMAKE_GENERATOR
- CMAKE_C_COMPILER_LAUNCHER
- CMAKE_CXX_COMPILER_LAUNCHER
- CMAKE_CUDA_COMPILER_LAUNCHER
- SCCACHE_S3_KEY_PREFIX=libraft-aarch64 # [aarch64]
- SCCACHE_S3_KEY_PREFIX=libraft-linux64 # [linux64]
- SCCACHE_BUCKET=rapids-sccache
- SCCACHE_REGION=us-west-2
- SCCACHE_IDLE_TIMEOUT=32768

requirements:
build:
Expand All @@ -53,4 +55,4 @@ about:
home: http://rapids.ai/
license: Apache-2.0
# license_file: LICENSE
summary: libraft-nn library
summary: libraft-nn library

0 comments on commit 7fb0158

Please sign in to comment.