-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate C++ conda recipes and add libraft-tests package (#641)
This PR includes the following changes: - Adds a `libraft-tests` package to the `libraft-split` recipe - This is a prerequisite for removing "Project Flash" from our build/CI scripts - The `libraft-tests` package was added as an additional output to the `libraft-split` recipe - Consolidates remaining C++ recipes into `libraft-split` recipe - This gets rid of a lot of duplicate code between the recipes and reduces the number of times we have to call conda build in our CI scripts - Migrate the "from sources" builds done in GPU tests by building packages using conda. This is done for the following reasons: - This is required step to improve the Ops CI/CD setup to a more convenient pipeline - This is required to start using conda compilers and `mamba` to build RAPIDS packages - This prevent us from manually managing and installing the dependencies in GPU job - This ensure the packages can be installed (no conda conflict while installing) - This ensure the tests are running and working against the package content and not the build results. Currently the Python packages are not tested Dependency version specs are now specified in `conda/recipes/libraft/conda_build_config.yaml`. The exception here is the version spec used for cudatoolkit since that comes from an environment variable in the CI process. Authors: - Jordan Jacobelli (https://github.com/Ethyling) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - AJ Schmidt (https://github.com/ajschmidt8) URL: #641
- Loading branch information
1 parent
7994820
commit 3c3cefd
Showing
15 changed files
with
204 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,18 +25,11 @@ export HOME="$WORKSPACE" | |
cd "$WORKSPACE" | ||
export GIT_DESCRIBE_TAG=`git describe --tags` | ||
export MINOR_VERSION=`echo $GIT_DESCRIBE_TAG | grep -o -E '([0-9]+\.[0-9]+)'` | ||
unset GIT_DESCRIBE_TAG | ||
|
||
# ucx-py version | ||
export UCX_PY_VERSION='0.27.*' | ||
|
||
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 | ||
################################################################################ | ||
|
@@ -47,40 +40,14 @@ env | |
gpuci_logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
# temporary usage of gpuci_mamba_retry install with packages listed here, looking into | ||
# using the repos yaml files for this | ||
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 -y -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ | ||
"cudatoolkit=${CUDA_REL}" \ | ||
"libcusolver>=11.2.1" \ | ||
"cudf=${MINOR_VERSION}" \ | ||
"rmm=${MINOR_VERSION}" \ | ||
"breathe" \ | ||
"dask-cudf=${MINOR_VERSION}" \ | ||
"dask-cuda=${MINOR_VERSION}" \ | ||
"ucx-py=${UCX_PY_VERSION}" \ | ||
"rapids-build-env=${MINOR_VERSION}.*" \ | ||
"rapids-notebook-env=${MINOR_VERSION}.*" | ||
|
||
if [ "$(arch)" = "x86_64" ]; then | ||
gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia \ | ||
"rapids-doc-env=${MINOR_VERSION}.*" | ||
fi | ||
|
||
# Install the master version of dask, distributed, and dask-ml | ||
gpuci_logger "Install the master version of dask and distributed" | ||
set -x | ||
pip install "git+https://github.com/dask/[email protected]" --upgrade --no-deps | ||
pip install "git+https://github.com/dask/[email protected]" --upgrade --no-deps | ||
set +x | ||
|
||
# Install pre-built conda packages from previous CI step | ||
gpuci_logger "Install libraft conda packages from CPU job" | ||
export LIBRAFT_CONDA_PACKAGES="$WORKSPACE/ci/artifacts/raft/cpu/.conda-bld/" # notice there is no `linux-64` here | ||
gpuci_mamba_retry install -c "${LIBRAFT_CONDA_PACKAGES}" libraft-headers libraft-distance libraft-nn | ||
CONDA_ARTIFACT_PATH="$WORKSPACE/ci/artifacts/raft/cpu/.conda-bld/" # notice there is no `linux-64` here | ||
gpuci_mamba_retry install -c "${CONDA_ARTIFACT_PATH}" libraft-headers libraft-distance libraft-nn libraft-tests | ||
|
||
gpuci_logger "Check compiler versions" | ||
python --version | ||
|
@@ -96,24 +63,16 @@ conda list --show-channel-urls | |
# BUILD - Build RAFT tests | ||
################################################################################ | ||
|
||
gpuci_logger "Adding ${CONDA_PREFIX}/lib to LD_LIBRARY_PATH" | ||
|
||
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH | ||
|
||
gpuci_logger "Build C++ and Python targets" | ||
# These should link against the existing shared libs | ||
if hasArg --skip-tests; then | ||
"$WORKSPACE/build.sh" pyraft pylibraft libraft -v | ||
else | ||
"$WORKSPACE/build.sh" pyraft pylibraft libraft tests bench -v | ||
fi | ||
gpuci_logger "Build and install Python targets" | ||
CONDA_BLD_DIR="$WORKSPACE/.conda-bld" | ||
gpuci_mamba_retry install boa | ||
gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pyraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" | ||
gpuci_conda_retry mambabuild --no-build-id --croot "${CONDA_BLD_DIR}" conda/recipes/pylibraft -c "${CONDA_ARTIFACT_PATH}" --python="${PYTHON}" | ||
gpuci_mamba_retry install -c "${CONDA_BLD_DIR}" -c "${CONDA_ARTIFACT_PATH}" pyraft pylibraft | ||
|
||
gpuci_logger "sccache stats" | ||
sccache --show-stats | ||
|
||
gpuci_logger "Building docs" | ||
"$WORKSPACE/build.sh" docs -v | ||
|
||
################################################################################ | ||
# TEST - Run GoogleTest and py.tests for RAFT | ||
################################################################################ | ||
|
@@ -123,22 +82,30 @@ if hasArg --skip-tests; then | |
exit 0 | ||
fi | ||
|
||
# Install the master version of dask, distributed, and dask-ml | ||
gpuci_logger "Install the master version of dask and distributed" | ||
set -x | ||
pip install "git+https://github.com/dask/[email protected]" --upgrade --no-deps | ||
pip install "git+https://github.com/dask/[email protected]" --upgrade --no-deps | ||
set +x | ||
|
||
gpuci_logger "Check GPU usage" | ||
nvidia-smi | ||
|
||
gpuci_logger "GoogleTest for raft" | ||
cd "$WORKSPACE/cpp/build" | ||
GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" ./test_raft | ||
cd "$WORKSPACE" | ||
GTEST_OUTPUT="xml:$WORKSPACE/test-results/raft_cpp/" "$CONDA_PREFIX/bin/libraft/gtests/test_raft" | ||
|
||
gpuci_logger "Python pytest for pyraft" | ||
cd "$WORKSPACE/python/raft" | ||
cd "$WORKSPACE/python/raft/raft/test" | ||
python -m pytest --cache-clear --junitxml="$WORKSPACE/junit-pyraft.xml" -v -s | ||
|
||
gpuci_logger "Python pytest for pylibraft" | ||
cd "$WORKSPACE/python/pylibraft" | ||
cd "$WORKSPACE/python/pylibraft/pylibraft/test" | ||
python -m pytest --cache-clear --junitxml="$WORKSPACE/junit-pylibraft.xml" -v -s | ||
|
||
if [ "$(arch)" = "x86_64" ]; then | ||
gpuci_logger "Building docs" | ||
gpuci_mamba_retry install "rapids-doc-env=${MINOR_VERSION}.*" | ||
"$WORKSPACE/build.sh" docs -v | ||
fi |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
|
||
./build.sh tests bench -v --allgpuarch --no-nvtx | ||
cmake --install cpp/build --component testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cmake_version: | ||
- ">=3.20.1,!=3.23.0" | ||
|
||
nccl_version: | ||
- ">=2.9.9" | ||
|
||
gtest_version: | ||
- "=1.10.0" | ||
|
||
libcusolver_version: | ||
- ">=11.2.1" | ||
|
||
libfaiss_version: | ||
- "1.7.0 *_cuda" |
Oops, something went wrong.