Skip to content

Commit 8d00af5

Browse files
committed
Merge remote-tracking branch 'origin/branch-25.02' into vamana_cleanup
2 parents cf24142 + a84788d commit 8d00af5

File tree

223 files changed

+1782
-338
lines changed

Some content is hidden

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

223 files changed

+1782
-338
lines changed

.pre-commit-config.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
1+
# Copyright (c) 2022-2025, NVIDIA CORPORATION.
22

33
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v5.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
49
- repo: https://github.com/PyCQA/isort
510
rev: 5.12.0
611
hooks:
@@ -81,7 +86,7 @@ repos:
8186
exclude: .*/thirdparty/.*
8287
- id: include-check
8388
name: include-check
84-
entry: python ./cpp/scripts/include_checker.py cpp/bench cpp/include cpp/test
89+
entry: python ./cpp/scripts/include_checker.py cpp/bench cpp/include cpp/tests
8590
pass_filenames: false
8691
language: python
8792
additional_dependencies: [gitpython]

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ cuVS contains state-of-the-art implementations of several algorithms for running
2929

3030
Vector search is an information retrieval method that has been growing in popularity over the past few years, partly because of the rising importance of multimedia embeddings created from unstructured data and the need to perform semantic search on the embeddings to find items which are semantically similar to each other.
3131

32-
Vector search is also used in _data mining and machine learning_ tasks and comprises an important step in many _clustering_ and _visualization_ algorithms like [UMAP](https://arxiv.org/abs/2008.00325), [t-SNE](https://lvdmaaten.github.io/tsne/), K-means, and [HDBSCAN](https://hdbscan.readthedocs.io/en/latest/how_hdbscan_works.html).
32+
Vector search is also used in _data mining and machine learning_ tasks and comprises an important step in many _clustering_ and _visualization_ algorithms like [UMAP](https://arxiv.org/abs/2008.00325), [t-SNE](https://lvdmaaten.github.io/tsne/), K-means, and [HDBSCAN](https://hdbscan.readthedocs.io/en/latest/how_hdbscan_works.html).
3333

34-
Finally, faster vector search enables interactions between dense vectors and graphs. Converting a pile of dense vectors into nearest neighbors graphs unlocks the entire world of graph analysis algorithms, such as those found in [GraphBLAS](https://graphblas.org/) and [cuGraph](https://github.com/rapidsai/cugraph).
34+
Finally, faster vector search enables interactions between dense vectors and graphs. Converting a pile of dense vectors into nearest neighbors graphs unlocks the entire world of graph analysis algorithms, such as those found in [GraphBLAS](https://graphblas.org/) and [cuGraph](https://github.com/rapidsai/cugraph).
3535

3636
Below are some common use-cases for vector search
3737

@@ -45,7 +45,7 @@ Below are some common use-cases for vector search
4545
- Audio search
4646
- Molecular search
4747
- Model training
48-
48+
4949

5050
- ### Data mining
5151
- Clustering algorithms
@@ -71,7 +71,7 @@ In addition to the items above, cuVS takes on the burden of keeping non-trivial
7171

7272
## cuVS Technology Stack
7373

74-
cuVS is built on top of the RAPIDS RAFT library of high performance machine learning primitives and provides all the necessary routines for vector search and clustering on the GPU.
74+
cuVS is built on top of the RAPIDS RAFT library of high performance machine learning primitives and provides all the necessary routines for vector search and clustering on the GPU.
7575

7676
![cuVS is built on top of low-level CUDA libraries and provides many important routines that enable vector search and clustering on the GPU](img/tech_stack.png "cuVS Technology Stack")
7777

@@ -103,7 +103,7 @@ pip install cuvs-cu11 --extra-index-url=https://pypi.nvidia.com
103103
And CUDA 12 packages:
104104
```bash
105105
pip install cuvs-cu12 --extra-index-url=https://pypi.nvidia.com
106-
```
106+
```
107107

108108
### Nightlies
109109
If installing a version that has not yet been released, the `rapidsai` channel can be replaced with `rapidsai-nightly`:
@@ -240,7 +240,7 @@ If you are interested in contributing to the cuVS library, please read our [Cont
240240

241241
## References
242242

243-
For the interested reader, many of the accelerated implementations in cuVS are also based on research papers which can provide a lot more background. We also ask you to please cite the corresponding algorithms by referencing them in your own research.
243+
For the interested reader, many of the accelerated implementations in cuVS are also based on research papers which can provide a lot more background. We also ask you to please cite the corresponding algorithms by referencing them in your own research.
244244
- [CAGRA: Highly Parallel Graph Construction and Approximate Nearest Neighbor Search](https://arxiv.org/abs/2308.15136)
245245
- [Top-K Algorithms on GPU: A Comprehensive Study and New Methods](https://dl.acm.org/doi/10.1145/3581784.3607062)
246246
- [Fast K-NN Graph Construction by GPU Based NN-Descent](https://dl.acm.org/doi/abs/10.1145/3459637.3482344?casa_token=O_nan1B1F5cAAAAA:QHWDEhh0wmd6UUTLY9_Gv6c3XI-5DXM9mXVaUXOYeStlpxTPmV3nKvABRfoivZAaQ3n8FWyrkWw>)

ci/run_cuvs_pytests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -euo pipefail
66
# Support invoking run_pytests.sh outside the script directory
77
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/cuvs/cuvs
88

9-
pytest --cache-clear --verbose "$@" test
9+
pytest --cache-clear --verbose "$@" tests

ci/test_python.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pytest \
5252
--cov=cuvs \
5353
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cuvs-coverage.xml" \
5454
--cov-report=term \
55-
test
55+
tests
5656

5757
rapids-logger "Test script exiting with value: $EXITCODE"
5858
exit ${EXITCODE}

ci/test_wheel_cuvs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ python -m pip install \
1313
./local-libcuvs-dep/libcuvs*.whl \
1414
"$(echo ./dist/cuvs*.whl)[test]"
1515

16-
python -m pytest ./python/cuvs/cuvs/test
16+
python -m pytest ./python/cuvs/cuvs/tests

cpp/.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ AlwaysBreakAfterDefinitionReturnType: None
2727
AlwaysBreakAfterReturnType: None
2828
AlwaysBreakBeforeMultilineStrings: true
2929
AlwaysBreakTemplateDeclarations: Yes
30-
BinPackArguments: false
30+
BinPackArguments: false
3131
BinPackParameters: false
3232
BraceWrapping:
3333
AfterClass: false

cpp/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,7 @@ target_compile_definitions(cuvs::cuvs INTERFACE $<$<BOOL:${CUVS_NVTX}>:NVTX_ENAB
685685
src/neighbors/cagra_c.cpp
686686
$<$<BOOL:${BUILD_CAGRA_HNSWLIB}>:src/neighbors/hnsw_c.cpp>
687687
src/neighbors/refine/refine_c.cpp
688+
src/preprocessing/quantize/scalar_c.cpp
688689
src/distance/pairwise_distance_c.cpp
689690
)
690691

@@ -797,7 +798,7 @@ endif()
797798
if(BUILD_TESTS)
798799
enable_testing()
799800
add_subdirectory(internal)
800-
add_subdirectory(test)
801+
add_subdirectory(tests)
801802
endif()
802803

803804
# ##################################################################################################

cpp/bench/ann/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ list(APPEND CMAKE_MODULE_PATH "${CUVS_SOURCE_DIR}")
2020
option(CUVS_ANN_BENCH_USE_FAISS_GPU_FLAT "Include faiss' brute-force knn algorithm in benchmark" ON)
2121
option(CUVS_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT "Include faiss' ivf flat algorithm in benchmark" ON)
2222
option(CUVS_ANN_BENCH_USE_FAISS_GPU_IVF_PQ "Include faiss' ivf pq algorithm in benchmark" ON)
23+
option(CUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA "Include faiss' cagra algorithm in benchmark" ON)
2324
option(CUVS_ANN_BENCH_USE_FAISS_CPU_FLAT "Include faiss' cpu brute-force algorithm in benchmark" ON)
2425
option(CUVS_ANN_BENCH_USE_FAISS_CPU_IVF_FLAT "Include faiss' cpu ivf flat algorithm in benchmark"
2526
ON
@@ -275,18 +276,28 @@ endif()
275276
if(CUVS_ANN_BENCH_USE_FAISS_GPU_IVF_FLAT AND CUVS_FAISS_ENABLE_GPU)
276277
ConfigureAnnBench(
277278
NAME FAISS_GPU_IVF_FLAT PATH src/faiss/faiss_gpu_benchmark.cu LINKS ${CUVS_FAISS_TARGETS}
279+
raft::raft
278280
)
279281
endif()
280282

281283
if(CUVS_ANN_BENCH_USE_FAISS_GPU_IVF_PQ AND CUVS_FAISS_ENABLE_GPU)
282284
ConfigureAnnBench(
283285
NAME FAISS_GPU_IVF_PQ PATH src/faiss/faiss_gpu_benchmark.cu LINKS ${CUVS_FAISS_TARGETS}
286+
raft::raft
284287
)
285288
endif()
286289

287290
if(CUVS_ANN_BENCH_USE_FAISS_GPU_FLAT AND CUVS_FAISS_ENABLE_GPU)
288291
ConfigureAnnBench(
289292
NAME FAISS_GPU_FLAT PATH src/faiss/faiss_gpu_benchmark.cu LINKS ${CUVS_FAISS_TARGETS}
293+
raft::raft
294+
)
295+
endif()
296+
297+
if(CUVS_ANN_BENCH_USE_FAISS_GPU_CAGRA AND CUVS_FAISS_ENABLE_GPU)
298+
ConfigureAnnBench(
299+
NAME FAISS_GPU_CAGRA PATH src/faiss/faiss_gpu_benchmark.cu LINKS ${CUVS_FAISS_TARGETS}
300+
raft::raft
290301
)
291302
endif()
292303

cpp/bench/ann/src/cuvs/cuvs_mg_ivf_flat_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ void cuvs_mg_ivf_flat<T, IdxT>::search(
137137
handle_, *index_, search_params_, queries_view, neighbors_view, distances_view);
138138
}
139139

140-
} // namespace cuvs::bench
140+
} // namespace cuvs::bench

cpp/bench/ann/src/cuvs/cuvs_mg_ivf_pq_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,4 @@ void cuvs_mg_ivf_pq<T, IdxT>::search(
136136
handle_, *index_, search_params_, queries_view, neighbors_view, distances_view);
137137
}
138138

139-
} // namespace cuvs::bench
139+
} // namespace cuvs::bench

0 commit comments

Comments
 (0)