Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
1986c44
feat(libcudf): port libcuvs to rattler-build
gforsyth Mar 4, 2025
821af31
fix(examples): define `hasArg` function in examples/build.sh
gforsyth Mar 5, 2025
92524e4
feat(cuvs): port cuvs to rattler-build
gforsyth Mar 5, 2025
64e54f6
fix(cuvs-bench): skip recompiling C library for `bench-ann`
gforsyth Mar 5, 2025
dd1cf19
feat(cuvs-bench): port cuvs-bench to rattler-build
gforsyth Mar 5, 2025
e0220b5
feat(cuvs-bench): add libcuvs-bench-ann output to cpp recipe
gforsyth Mar 5, 2025
9a14480
chore(build): revert changes to `build.sh`
gforsyth Mar 6, 2025
622b3b7
feat(build.sh): allow skipping python install for `bench-ann`
gforsyth Mar 6, 2025
20aeba6
feat(libcuvs): add benchmark c++ output
gforsyth Mar 6, 2025
c0c69fd
fix(cuvs-bench): remove build environment (now in libcuvs)
gforsyth Mar 6, 2025
cc42cbb
Port cuvs-bench-cpu to rattler-build
gforsyth Mar 6, 2025
1e6e721
refactor: remove conda-build recipes and unused build scripts
gforsyth Mar 6, 2025
a3a994b
refactor(build.sh): remove defunct static libs flag
gforsyth Mar 6, 2025
fb62054
refactor(cuvs-bench-cpu): add import tests and remove cuda variable
gforsyth Mar 6, 2025
060860c
switch over to rattler-build in CI
gforsyth Mar 6, 2025
b597650
disable most workflows for testing rattler
gforsyth Mar 6, 2025
50e81ce
Revert "disable most workflows for testing rattler"
gforsyth Mar 6, 2025
1e2bf00
Add openblas to pre-build stage for bench-ann
gforsyth Mar 6, 2025
5896758
fix(libcuvs): gate x86 deps in libcuvs-bench output
gforsyth Mar 7, 2025
e105ec7
chore: disable wheel and other workflows again
gforsyth Mar 7, 2025
0b030ea
fix(libcuvs): only copy libdiskann.so on x86 when it will exist
gforsyth Mar 7, 2025
4712a0b
fix(libcuvs-tests): build the tests in the pre-build stage
gforsyth Mar 7, 2025
5d123d9
fix(libcuvs): add nccl runtime dependency
gforsyth Mar 7, 2025
0164827
fix(cuvs-bench): add gitignore negation for datasets.yaml
gforsyth Mar 7, 2025
19e5c65
fix(cuvs-bench): add test for datasets.yaml existence
gforsyth Mar 7, 2025
0724d95
fix(cuvs-bench): cleanup host deps
gforsyth Mar 7, 2025
9bfa4f9
[temporary]: expand testing matrix
gforsyth Mar 7, 2025
17aa2c0
remove `datasets` from gitignore
gforsyth Mar 10, 2025
f68704e
fix(cuvs-bench): add libcuvs-bench-ann as runtime dep
gforsyth Mar 10, 2025
2eb7ddd
Revert "remove `datasets` from gitignore"
gforsyth Mar 10, 2025
77947cb
Merge branch 'branch-25.04' into rattler-build
gforsyth Mar 10, 2025
71be315
Revert "[temporary]: expand testing matrix"
gforsyth Mar 10, 2025
4ed9709
Revert "chore: disable wheel and other workflows again"
gforsyth Mar 10, 2025
17085c8
Reapply "remove `datasets` from gitignore"
gforsyth Mar 10, 2025
6933581
Constrain .gitignore entry to only top-level datasets folder
gforsyth Mar 10, 2025
6ec34e6
Add additional run_exports to avoid overconstraining outputs
gforsyth Mar 11, 2025
c84e471
Merge branch 'branch-25.04' into rattler-build
gforsyth Mar 12, 2025
0c84f88
Fix cuda 11 runtime deps and relax mkl pin
gforsyth Mar 12, 2025
5d8c652
Only require mkl on linux64
gforsyth Mar 12, 2025
08373fd
ignore run export for cudatoolkit in libcuvs
gforsyth Mar 12, 2025
2e230c7
Fix the other yaml comment
gforsyth Mar 13, 2025
6ef134e
Make test for datasets.yaml existence more robust
gforsyth Mar 13, 2025
851825f
Disable binary prefix replacement
gforsyth Mar 14, 2025
21caaee
refactor: make sccache prefix keys more granular
gforsyth Mar 17, 2025
95897cb
Merge branch 'branch-25.04' into rattler-build
gforsyth Mar 18, 2025
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ ivf_flat_index
ivf_pq_index

# cuvs_bench
datasets/
#datasets/
!python/cuvs_bench/cuvs_bench/config/datasets/datasets.yaml
Comment thread
gforsyth marked this conversation as resolved.
Outdated
/*.json

# java
Expand Down
7 changes: 3 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARGS=$*
# scripts, and that this script resides in the repo dir!
REPODIR=$(cd $(dirname $0); pwd)

VALIDARGS="clean libcuvs python rust go java docs tests bench-ann examples --uninstall -v -g -n --compile-static-lib --allgpuarch --no-mg --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h"
VALIDARGS="clean libcuvs python rust go java docs tests bench-ann examples --uninstall -v -g -n --allgpuarch --no-mg --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h"
HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<tool>] [--limit-tests=<targets>] [--limit-bench-ann=<targets>] [--build-metrics=<filename>]
where <target> is:
clean - remove all existing build artifacts and configuration (start over)
Expand All @@ -38,7 +38,6 @@ HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<to
-g - build for debug
-n - no install step
--uninstall - uninstall files for specified targets which were built and installed prior
--compile-static-lib - compile static library for all components
--cpu-only - build CPU only components without CUDA. Currently only applies to bench-ann.
--limit-tests - semicolon-separated list of test executables to compile (e.g. NEIGHBORS_TEST;CLUSTER_TEST)
--limit-bench-ann - semicolon-separated list of ann benchmark executables to compute (e.g. HNSWLIB_ANN_BENCH;RAFT_IVF_PQ_ANN_BENCH)
Expand Down Expand Up @@ -332,7 +331,7 @@ fi

################################################################################
# Configure for building all C++ targets
if (( ${NUMARGS} == 0 )) || hasArg libcuvs || hasArg docs || hasArg tests || hasArg bench-prims || hasArg bench-ann; then
if (( NUMARGS == 0 )) || hasArg libcuvs || hasArg docs || hasArg tests || hasArg bench-prims || hasArg bench-ann; then
COMPILE_LIBRARY=ON
if (( ${BUILD_SHARED_LIBS} == "OFF" )); then
CMAKE_TARGET="${CMAKE_TARGET};"
Expand Down Expand Up @@ -437,7 +436,7 @@ if (( ${NUMARGS} == 0 )) || hasArg python; then
fi

# Build and (optionally) install the cuvs-bench Python package
if (( ${NUMARGS} == 0 )) || hasArg bench-ann; then
if (( NUMARGS == 0 )) || (hasArg bench-ann && ! hasArg -n); then
python -m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true ${REPODIR}/python/cuvs_bench
fi

Expand Down
20 changes: 18 additions & 2 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,25 @@ rapids-logger "Begin cpp build"

sccache --zero-stats

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry build \
conda/recipes/libcuvs

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version)
export RAPIDS_PACKAGE_VERSION

source rapids-rattler-channel-string

# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/libcuvs \
--experimental \
--no-build-id \
--channel-priority disabled \
--output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

# remove build_cache directory
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache

rapids-upload-conda-to-s3 cpp
52 changes: 35 additions & 17 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,39 @@ echo "${version}" > VERSION

sccache --zero-stats

# TODO: Remove `--no-test` flags once importing on a CPU
# node works correctly
rapids-conda-retry build \
--no-test \
--channel "${CPP_CHANNEL}" \
conda/recipes/cuvs

# populates `RATTLER_CHANNELS` array
source rapids-rattler-channel-string

rapids-logger "Prepending channel ${CPP_CHANNEL} to RATTLER_CHANNELS"

RATTLER_CHANNELS=("--channel" "${CPP_CHANNEL}" "${RATTLER_CHANNELS[@]}")

sccache --zero-stats

rapids-logger "Building cuvs"

# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/cuvs \
--experimental \
--no-build-id \
--channel-priority disabled \
--output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \
--test skip \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats
sccache --zero-stats

# Build cuvs-bench for each cuda and python version
rapids-conda-retry build \
--no-test \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/cuvs-bench
rattler-build build --recipe conda/recipes/cuvs-bench \
--experimental \
--no-build-id \
--channel-priority disabled \
--output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \
--test skip \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats
sccache --zero-stats
Expand All @@ -47,11 +64,12 @@ sccache --zero-stats
# version
RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}"
if [[ ${RAPIDS_CUDA_MAJOR} == "12" ]]; then
rapids-conda-retry build \
--channel "${CPP_CHANNEL}" \
--channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \
conda/recipes/cuvs-bench-cpu

rattler-build build --recipe conda/recipes/cuvs-bench-cpu \
--experimental \
--no-build-id \
--channel-priority disabled \
--output-dir "$RAPIDS_CONDA_BLD_OUTPUT_DIR" \
"${RATTLER_CHANNELS[@]}"
sccache --show-adv-stats
fi

Expand Down
5 changes: 0 additions & 5 deletions conda/recipes/cuvs-bench-cpu/build.sh

This file was deleted.

84 changes: 0 additions & 84 deletions conda/recipes/cuvs-bench-cpu/meta.yaml

This file was deleted.

102 changes: 102 additions & 0 deletions conda/recipes/cuvs-bench-cpu/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Copyright (c) 2025, NVIDIA CORPORATION.
schema_version: 1

context:
version: ${{ env.get("RAPIDS_PACKAGE_VERSION") }}
date_string: '${{ env.get("RAPIDS_DATE_STRING") }}'
py_version: ${{ env.get("RAPIDS_PY_VERSION") }}
py_buildstring: ${{ py_version | version_to_buildstring }}
head_rev: ${{ git.head_rev(".")[:8] }}
linux64: ${{ linux and x86_64 }}

package:
name: cuvs-bench-cpu
version: ${{ version }}

source:
path: ../../..

build:
string: py${{ py_buildstring }}_${{ date_string }}_${{ head_rev }}
script:
content: |

# Remove `-fdebug-prefix-map` line from CFLAGS and CXXFLAGS so the
# incrementing version number in the compile line doesn't break the
# cache
set -x
export CFLAGS=$(echo $CFLAGS | sed -E 's@\-fdebug\-prefix\-map[^ ]*@@g')
export CXXFLAGS=$(echo $CXXFLAGS | sed -E 's@\-fdebug\-prefix\-map[^ ]*@@g')
set +x
Comment on lines +24 to +30
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


./build.sh bench-ann --cpu-only --no-nvtx --build-metrics=bench_ann_cpu --incl-cache-stats
cmake --install cpp/build --component ann_bench

secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
env:
CMAKE_C_COMPILER_LAUNCHER: ${{ env.get("CMAKE_C_COMPILER_LAUNCHER") }}
CMAKE_CXX_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CXX_COMPILER_LAUNCHER") }}
CMAKE_GENERATOR: ${{ env.get("CMAKE_GENERATOR") }}
PARALLEL_LEVEL: ${{ env.get("PARALLEL_LEVEL") }}
RAPIDS_ARTIFACTS_DIR: ${{ env.get("RAPIDS_ARTIFACTS_DIR") }}
SCCACHE_BUCKET: ${{ env.get("SCCACHE_BUCKET") }}
SCCACHE_IDLE_TIMEOUT: ${{ env.get("SCCACHE_IDLE_TIMEOUT") }}
SCCACHE_REGION: ${{ env.get("SCCACHE_REGION") }}
SCCACHE_S3_USE_SSL: ${{ env.get("SCCACHE_S3_USE_SSL") }}
SCCACHE_S3_NO_CREDENTIALS: ${{ env.get("SCCACHE_S3_NO_CREDENTIALS") }}
SCCACHE_S3_KEY_PREFIX: libcuvs-${{ env.get("RAPIDS_CONDA_ARCH") }}

requirements:
build:
- ${{ compiler("c") }}
- ${{ compiler("cxx") }}
- cmake ${{ cmake_version }}
- ninja
- ${{ stdlib("c") }}
host:
- benchmark
- glog ${{ glog_version }}
- nlohmann_json ${{ nlohmann_json_version }}
- openblas
- pip
- python =${{ py_version }}
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- if: linux64
then:
- libaio
- libboost-devel=1.87
- mkl-devel=2023
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For follow-up: Why is this pinned to mkl 2023? The latest is 2025.0.1. https://anaconda.org/conda-forge/mkl/files

run:
- benchmark
- click
- glog ${{ glog_version }}
- h5py ${{ h5py_version }}
- matplotlib-base
- numpy >=1.23,<3.0a0
- pandas
- pyyaml
- python
- requests
- scikit-learn>=1.5
- if: linux64
then:
- mkl =2023

tests:
- python:
imports:
- cuvs_bench
- cuvs_bench.generate_groundtruth
- cuvs_bench.get_dataset
- cuvs_bench.plot
- cuvs_bench.run
- cuvs_bench.split_groundtruth
pip_check: false

about:
homepage: ${{ load_from_file("python/cuvs_bench/pyproject.toml").project.urls.Homepage }}
license: ${{ load_from_file("python/cuvs_bench/pyproject.toml").project.license.text }}
summary: cuVS CPU benchmark
5 changes: 0 additions & 5 deletions conda/recipes/cuvs-bench/build.sh

This file was deleted.

Loading