Skip to content

Commit 8265720

Browse files
committed
Merge branch 'cagra-improve-ace-revedge' of github.com:enp1s0/cuvs into cagra-improve-ace-revedge
2 parents a9a3c5b + 5025945 commit 8265720

68 files changed

Lines changed: 4453 additions & 433 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/cuda12.9-pip/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"args": {
66
"CUDA": "12.9",
77
"PYTHON_PACKAGE_MANAGER": "pip",
8-
"BASE": "rapidsai/devcontainers:26.12-cpp-cuda12.9-ucx1.19.0-openmpi5.0.10"
8+
"BASE": "rapidsai/devcontainers:26.12-cpp-cuda12.9-ucx1.21.0-openmpi5.0.10"
99
},
1010
"cacheFrom": [
1111
"ghcr.io/rapidsai/cuvs/devcontainer:26.12-cuda12.9-pip"

.devcontainer/cuda13.3-pip/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"args": {
66
"CUDA": "13.3",
77
"PYTHON_PACKAGE_MANAGER": "pip",
8-
"BASE": "rapidsai/devcontainers:26.12-cpp-cuda13.3-ucx1.19.0-openmpi5.0.10"
8+
"BASE": "rapidsai/devcontainers:26.12-cpp-cuda13.3-ucx1.21.0-openmpi5.0.10"
99
},
1010
"cacheFrom": [
1111
"ghcr.io/rapidsai/cuvs/devcontainer:26.12-cuda13.3-pip"

.github/workflows/build.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,15 @@ jobs:
259259
secrets:
260260
GPUTESTER_CRATES_TOKEN: ${{ secrets.GPUTESTER_CRATES_TOKEN }}
261261
uses: ./.github/workflows/publish-rust.yaml
262+
docs-build-matrix:
263+
permissions:
264+
contents: read
265+
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main
266+
with:
267+
build_type: ${{ inputs.build_type || 'branch' }}
268+
matrix_name: docs-build
262269
docs-build:
270+
needs: [docs-build-matrix]
263271
if: github.ref_type == 'branch'
264272
permissions:
265273
actions: read
@@ -269,13 +277,16 @@ jobs:
269277
pull-requests: read
270278
secrets: inherit # zizmor: ignore[secrets-inherit]
271279
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
280+
strategy:
281+
fail-fast: false
282+
matrix: ${{ fromJSON(needs.docs-build-matrix.outputs.matrix) }}
272283
with:
273-
arch: "amd64"
284+
arch: "${{ matrix.arch }}"
274285
branch: ${{ inputs.branch }}
275286
build_type: ${{ inputs.build_type || 'branch' }}
276-
container_image: "rapidsai/ci-conda:26.12-latest"
287+
container_image: "rapidsai/ci-conda:26.12-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
277288
date: ${{ inputs.date }}
278-
node_type: "gpu-l4-latest-1"
289+
node_type: "gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-1"
279290
script: "ci/build_docs.sh"
280291
sha: ${{ inputs.sha }}
281292
wheel-build-libcuvs:

.github/workflows/pr.yaml

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- go-build-matrix
3434
- go-build
3535
- docs-build
36+
- docs-build-matrix
3637
- wheel-build-libcuvs
3738
- wheel-build-cuvs
3839
- wheel-tests-cuvs
@@ -162,6 +163,8 @@ jobs:
162163
- '!ci/test_wheel_cuvs.sh'
163164
- '!ci/validate_wheel.sh'
164165
- '!docs/**'
166+
- '!examples/go/**'
167+
- '!examples/java/**'
165168
- '!fern/**'
166169
- '!go/**'
167170
- '!img/**'
@@ -214,7 +217,15 @@ jobs:
214217
- '!conda/recipes/cuvs-bench/**'
215218
- '!conda/recipes/cuvs-bench-cpu/**'
216219
- '!docs/**'
217-
- '!examples/**'
220+
- '!examples/.clang-format'
221+
- '!examples/.clang-tidy'
222+
- '!examples/.clangd'
223+
- '!examples/README.md'
224+
- '!examples/build.sh'
225+
- '!examples/c/**'
226+
- '!examples/cmake/**'
227+
- '!examples/cpp/**'
228+
- '!examples/go/**'
218229
- '!fern/**'
219230
- '!go/**'
220231
- '!img/**'
@@ -268,6 +279,7 @@ jobs:
268279
- '!README.md'
269280
- '!SECURITY.md'
270281
- '!docs/**'
282+
- '!examples/**'
271283
- '!fern/**'
272284
- '!go/**'
273285
- '!img/**'
@@ -325,6 +337,7 @@ jobs:
325337
- '!cpp/.clang-tidy'
326338
- '!cpp/doxygen/**'
327339
- '!docs/**'
340+
- '!examples/**'
328341
- '!fern/**'
329342
- '!java/**'
330343
- '!go/**'
@@ -377,6 +390,7 @@ jobs:
377390
- '!ci/test_wheel_cuvs.sh'
378391
- '!ci/validate_wheel.sh'
379392
- '!docs/**'
393+
- '!examples/**'
380394
- '!fern/**'
381395
- '!go/**'
382396
- '!img/**'
@@ -430,6 +444,15 @@ jobs:
430444
- '!ci/test_wheel_cuvs.sh'
431445
- '!ci/validate_wheel.sh'
432446
- '!docs/**'
447+
- '!examples/.clang-format'
448+
- '!examples/.clang-tidy'
449+
- '!examples/.clangd'
450+
- '!examples/README.md'
451+
- '!examples/build.sh'
452+
- '!examples/c/**'
453+
- '!examples/cmake/**'
454+
- '!examples/cpp/**'
455+
- '!examples/java/**'
433456
- '!fern/**'
434457
- '!img/**'
435458
- '!java/**'
@@ -715,7 +738,15 @@ jobs:
715738
arch: "amd64"
716739
container_image: "rapidsai/ci-conda:26.12-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
717740
script: "ci/build_go.sh"
741+
docs-build-matrix:
742+
permissions:
743+
contents: read
744+
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@main
745+
with:
746+
build_type: pull-request
747+
matrix_name: docs-build
718748
docs-build:
749+
needs: [docs-build-matrix]
719750
permissions:
720751
actions: read
721752
contents: read
@@ -724,11 +755,15 @@ jobs:
724755
pull-requests: read
725756
secrets: inherit # zizmor: ignore[secrets-inherit]
726757
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@main
758+
if: fromJSON(needs.changed-files.outputs.changed_file_groups).build_docs
759+
strategy:
760+
fail-fast: false
761+
matrix: ${{ fromJSON(needs.docs-build-matrix.outputs.matrix) }}
727762
with:
728763
build_type: pull-request
729-
node_type: "gpu-l4-latest-1"
730-
arch: "amd64"
731-
container_image: "rapidsai/ci-conda:26.12-latest"
764+
node_type: "gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-1"
765+
arch: "${{ matrix.arch }}"
766+
container_image: "rapidsai/ci-conda:26.12-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
732767
script: "ci/build_docs.sh"
733768
wheel-build-libcuvs:
734769
needs: [build-details, checks]

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ repos:
121121
name: spotless-fmt
122122
entry: ci/checks/run_spotless.sh
123123
pass_filenames: false
124-
files: ^java/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*\.java$
124+
files: ^(java|examples/java)/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*\.java$
125125
exclude: .*/panama/.*
126126
language: script
127127
verbose: true

build.sh

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ARGS=$*
1919
# scripts, and that this script resides in the repo dir!
2020
REPODIR=$(cd "$(dirname "$0")"; pwd)
2121

22-
VALIDARGS="clean libcuvs python rust go java lucene docs tests bench-ann examples --uninstall -v -g -n --allgpuarch --no-mg --mnmg-tests --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h --run-java-tests"
22+
VALIDARGS="clean libcuvs python rust go java lucene docs tests bench-ann examples --uninstall -v -g -n --allgpuarch --no-mg --mnmg-tests --no-cpu --cpu-only --no-shared-libs --no-nvtx --show_depr_warn --incl-cache-stats --time -h --run-java-tests --build-java-examples"
2323
HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<tool>] [--limit-tests=<targets>] [--limit-bench-ann=<targets>] [--build-metrics=<filename>]
2424
where <target> is:
2525
clean - remove all existing build artifacts and configuration (start over)
@@ -57,6 +57,8 @@ HELP="$0 [<target> ...] [<flag> ...] [--cmake-args=\"<args>\"] [--cache-tool=<to
5757
--no-shared-libs - build without shared libraries
5858
--show_depr_warn - show cmake deprecation warnings
5959
--run-java-tests - run Java tests after building
60+
--build-java-examples - also build the examples/java/cuvs-java and examples/java/cuvs-lucene
61+
projects against the jars just built (with the 'java'/'lucene' targets)
6062
--build-metrics - filename for generating build metrics report for libcuvs
6163
--incl-cache-stats - include cache statistics in build metrics report
6264
--cmake-args=\\\"<args>\\\" - pass arbitrary list of CMake configuration options (escape all quotes in argument)
@@ -560,11 +562,14 @@ if (( NUMARGS == 0 )) || hasArg java; then
560562
echo "Please add 'libcuvs' to this script's arguments (ex. './build.sh libcuvs java') if libcuvs libraries are not already built"
561563
fi
562564
cd "${REPODIR}"/java
565+
JAVA_BUILD_ARGS=()
563566
if hasArg --run-java-tests; then
564-
./build.sh --run-java-tests
565-
else
566-
./build.sh
567+
JAVA_BUILD_ARGS+=("--run-java-tests")
567568
fi
569+
if hasArg --build-java-examples; then
570+
JAVA_BUILD_ARGS+=("--build-java-examples")
571+
fi
572+
./build.sh "${JAVA_BUILD_ARGS[@]}"
568573
fi
569574

570575
# Build the cuvs-lucene codecs
@@ -573,11 +578,14 @@ if (( NUMARGS == 0 )) || hasArg lucene; then
573578
echo "Please add 'java' to this script's arguments (ex. './build.sh libcuvs java lucene') if the cuvs Java bindings are not already built"
574579
fi
575580
cd "${REPODIR}"/java/cuvs-lucene
581+
LUCENE_BUILD_ARGS=()
576582
if hasArg --run-java-tests; then
577-
./build.sh --run-java-tests
578-
else
579-
./build.sh
583+
LUCENE_BUILD_ARGS+=("--run-java-tests")
584+
fi
585+
if hasArg --build-java-examples; then
586+
LUCENE_BUILD_ARGS+=("--build-java-examples")
580587
fi
588+
./build.sh "${LUCENE_BUILD_ARGS[@]}"
581589
fi
582590

583591
RAPIDS_VERSION="$(sed -E -e 's/^([0-9]{2})\.([0-9]{2})\.([0-9]{2}).*$/\1.\2.\3/' "${REPODIR}/VERSION")"

ci/build_java.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export SCCACHE_S3_USE_PREPROCESSOR_CACHE_MODE=true
1313
# TODO: Remove this argument-handling when build and test workflows are separated,
1414
# and test_java.sh no longer calls build_java.sh
1515
# ref: https://github.com/nvidia/cuvs/issues/868
16-
EXTRA_BUILD_ARGS=()
16+
EXTRA_BUILD_ARGS=("--build-java-examples")
1717
if [[ "${1:-}" == "--run-java-tests" ]]; then
1818
EXTRA_BUILD_ARGS+=("--run-java-tests")
1919
fi

ci/build_lucene.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set -euo pipefail
99
# TODO: Remove the flag handling when build and test workflows are separated,
1010
# and test_lucene.sh no longer calls build_lucene.sh
1111
# ref: https://github.com/rapidsai/cuvs/issues/868
12-
EXTRA_BUILD_ARGS=()
12+
EXTRA_BUILD_ARGS=("--build-java-examples")
1313
CUVS_JAVA_ARTIFACT=""
1414
for arg in "$@"; do
1515
case "${arg}" in

ci/checks/run_spotless.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
# pre-commit hook wrapper that runs 'spotless:apply' to format the Java sources of every Maven
6-
# project under java/.
6+
# project under java/ and examples/java/.
77
#
88
# Most cuvs contributors do not work on the Java client and do not have Maven installed. For them,
99
# running 'pre-commit run --all-files' matches every Java source file in the repo regardless of
@@ -15,11 +15,11 @@ set -euo pipefail
1515

1616
# Keep these in sync with the spotless-fmt hook's 'files'/'exclude' entries in
1717
# .pre-commit-config.yaml.
18-
JAVA_SRC_PATTERN='^java/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*\.java$'
18+
JAVA_SRC_PATTERN='^(java|examples/java)/(cuvs-java|cuvs-lucene)/([^/]+/)?src/.*\.java$'
1919
JAVA_SRC_EXCLUDE='.*/panama/.*'
2020

2121
java_sources_modified() {
22-
git status --porcelain --untracked-files=all -- java/cuvs-java java/cuvs-lucene |
22+
git status --porcelain --untracked-files=all -- java/cuvs-java java/cuvs-lucene examples/java |
2323
cut -c4- |
2424
grep -Ev "${JAVA_SRC_EXCLUDE}" |
2525
grep -Eq "${JAVA_SRC_PATTERN}"
@@ -42,7 +42,8 @@ POMS=(
4242
java/cuvs-java/pom.xml
4343
java/cuvs-lucene/pom.xml
4444
java/cuvs-lucene/bench/pom.xml
45-
java/cuvs-lucene/examples/pom.xml
45+
examples/java/cuvs-java/pom.xml
46+
examples/java/cuvs-lucene/pom.xml
4647
)
4748

4849
for pom in "${POMS[@]}"; do

ci/release/update-version.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ done
172172
NEXT_FULL_JAVA_TAG="${NEXT_SHORT_TAG}.${PATCH_PEP440}"
173173
sed_runner "s/VERSION=\".*\"/VERSION=\"${NEXT_FULL_JAVA_TAG}\"/g" java/build.sh
174174
sed_runner "s/VERSION=\".*\"/VERSION=\"${NEXT_FULL_JAVA_TAG}\"/g" java/cuvs-lucene/build.sh
175-
for FILE in java/*/pom.xml java/cuvs-lucene/bench/pom.xml java/cuvs-lucene/examples/pom.xml; do
175+
for FILE in java/*/pom.xml java/cuvs-lucene/bench/pom.xml examples/java/cuvs-java/pom.xml examples/java/cuvs-lucene/pom.xml; do
176176
sed_runner "/<!--CUVS_JAVA#VERSION_UPDATE_MARKER_START-->.*<!--CUVS_JAVA#VERSION_UPDATE_MARKER_END-->/s//<!--CUVS_JAVA#VERSION_UPDATE_MARKER_START--><version>${NEXT_FULL_JAVA_TAG}<\/version><!--CUVS_JAVA#VERSION_UPDATE_MARKER_END-->/g" "${FILE}"
177177
done
178178

179179
sed_runner "s| CuVS [[:digit:]]\{2\}\.[[:digit:]]\{2\} | CuVS ${NEXT_SHORT_TAG} |g" java/README.md
180-
sed_runner "s|-[[:digit:]]\{2\}\.[[:digit:]]\{2\}\.[[:digit:]]\{1,2\}\.jar|-${NEXT_FULL_JAVA_TAG}\.jar|g" java/examples/README.md
181-
sed_runner "s|/[[:digit:]]\{2\}\.[[:digit:]]\{2\}\.[[:digit:]]\{1,2\}/|/${NEXT_FULL_JAVA_TAG}/|g" java/examples/README.md
180+
sed_runner "s|-[[:digit:]]\{2\}\.[[:digit:]]\{2\}\.[[:digit:]]\{1,2\}\.jar|-${NEXT_FULL_JAVA_TAG}\.jar|g" examples/java/cuvs-java/README.md
181+
sed_runner "s|/[[:digit:]]\{2\}\.[[:digit:]]\{2\}\.[[:digit:]]\{1,2\}/|/${NEXT_FULL_JAVA_TAG}/|g" examples/java/cuvs-java/README.md
182182

183183
# This pattern is deliberately narrow: java/cuvs-lucene/README.md also links to a blog post whose
184184
# title contains a release number, and that reference must not be rewritten.
185185
sed_runner "s|<version>[[:digit:]]\{2\}\.[[:digit:]]\{2\}\.[[:digit:]]\{1,2\}</version>|<version>${NEXT_FULL_JAVA_TAG}</version>|g" java/cuvs-lucene/README.md
186186

187-
sed_runner "s|target/examples-[\.0-9]*-jar|target/examples-${NEXT_FULL_JAVA_TAG}-jar|g" java/cuvs-lucene/examples/README.md
187+
sed_runner "s|target/examples-[\.0-9]*-jar|target/examples-${NEXT_FULL_JAVA_TAG}-jar|g" examples/java/cuvs-lucene/README.md

0 commit comments

Comments
 (0)