Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions c/include/cuvs/neighbors/all_neighbors.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -17,7 +17,7 @@ extern "C" {
#endif

/**
* @defgroup all_neighbors_c_build All-neighbors C-API build
* @defgroup all_neighbors_c_params All-neighbors C-API build parameters
* @{
*
* All-neighbors constructs an approximate k-NN graph for all vectors in a dataset.
Expand Down Expand Up @@ -78,6 +78,13 @@ cuvsError_t cuvsAllNeighborsIndexParamsCreate(cuvsAllNeighborsIndexParams_t* ind
*/
cuvsError_t cuvsAllNeighborsIndexParamsDestroy(cuvsAllNeighborsIndexParams_t index_params);

/** @} */

/**
* @defgroup all_neighbors_c_build All-neighbors C-API build
* @{
*/

/**
* @brief Build an all-neighbors k-NN graph automatically detecting host vs device dataset.
*
Expand Down
8 changes: 3 additions & 5 deletions cpp/include/cuvs/cluster/kmeans.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1573,15 +1573,14 @@ void cluster_cost(
* @}
*/

namespace helpers {
/**
* @defgroup kmeans_helpers k-means API helpers
* @{
*/

namespace helpers {

/**
* Automatically find the optimal value of k using a binary search.
* @brief Automatically find the optimal value of k using a binary search.
* This method maximizes the Calinski-Harabasz Index while minimizing the per-cluster inertia.
*
* @code{.cpp}
Expand Down Expand Up @@ -1626,10 +1625,9 @@ void find_k(raft::resources const& handle,
int kmin = 1,
int maxiter = 100,
float tol = 1e-3);
} // namespace helpers

/**
* @}
*/
} // namespace helpers

} // namespace cuvs::cluster::kmeans
9 changes: 5 additions & 4 deletions cpp/include/cuvs/preprocessing/quantize/binary.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/

Expand Down Expand Up @@ -30,11 +30,10 @@ enum class bit_threshold { zero, mean, sampling_median };
* @brief quantizer parameters.
*/
struct params {
/** Threshold method for binarization. */
bit_threshold threshold = bit_threshold::mean;

/*
* specifies the sampling ratio
*/
/** Specifies the sampling ratio. */
float sampling_ratio = 0.1;
};

Expand All @@ -48,8 +47,10 @@ struct params {
*/
template <typename T>
struct quantizer {
/** Threshold vector used for binarization. */
raft::device_vector<T, int64_t> threshold;

/** @brief Construct a quantizer with an empty threshold vector. */
quantizer(raft::resources const& res) : threshold(raft::make_device_vector<T, int64_t>(res, 0)) {}
};

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/cuvs/preprocessing/quantize/pq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ struct params {
*/
template <typename T>
struct quantizer {
/** Parameters used to build this quantizer. */
params params_quantizer;
/** VPQ codebooks produced during training. */
cuvs::neighbors::vpq_dataset<T, int64_t> vpq_codebooks;
};

Expand Down
10 changes: 6 additions & 4 deletions cpp/include/cuvs/preprocessing/quantize/scalar.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
* SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/

Expand All @@ -24,9 +24,9 @@ namespace cuvs::preprocessing::quantize::scalar {
* @brief quantizer parameters.
*/
struct params {
/*
* specifies how many outliers at top & bottom will be ignored
* needs to be within range of (0, 1]
/**
* Specifies how many outliers at top & bottom will be ignored.
* Needs to be within range of (0, 1].
*/
float quantile = 0.99;
};
Expand All @@ -42,7 +42,9 @@ struct params {
*/
template <typename T>
struct quantizer {
/** Minimum value of the quantization range. */
T min_;
/** Maximum value of the quantization range. */
T max_;
};

Expand Down
6 changes: 3 additions & 3 deletions docs/source/c_api/neighbors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Nearest Neighbors
:maxdepth: 2
:caption: Contents:

neighbors_all_neighbors_c.rst
neighbors_bruteforce_c.rst
neighbors_ivf_flat_c.rst
neighbors_ivf_pq_c.rst
neighbors_cagra_c.rst
neighbors_hnsw_c.rst
neighbors_ivf_flat_c.rst
neighbors_ivf_pq_c.rst
neighbors_mg.rst
neighbors_all_neighbors_c.rst
neighbors_vamana_c.rst
8 changes: 8 additions & 0 deletions docs/source/c_api/neighbors_all_neighbors_c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ The all-neighbors method constructs a k-NN graph for all vectors in a dataset. I

``#include <cuvs/neighbors/all_neighbors.h>``

Build parameters
----------------

.. doxygengroup:: all_neighbors_c_params
:project: cuvs
:members:
:content-only:

Build
-----

Expand Down
2 changes: 1 addition & 1 deletion docs/source/cpp_api/cluster.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Cluster
:maxdepth: 2
:caption: Contents:

cluster_kmeans.rst
cluster_agglomerative.rst
cluster_kmeans.rst
cluster_spectral.rst
10 changes: 5 additions & 5 deletions docs/source/cpp_api/cluster_agglomerative.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Agglomerative
:language: c++
:class: highlight

Params
------
Parameters
----------

``#include <cuvs/cluster/agglomerative.hpp>``

Expand All @@ -18,10 +18,10 @@ namespace *cuvs::cluster::agglomerative*
:content-only:


Single-linkage
--------------
Agglomerative
-------------

``include <cuvs/cluster/agglomerative.hpp>``
``#include <cuvs/cluster/agglomerative.hpp>``

namespace *cuvs::cluster::agglomerative*

Expand Down
8 changes: 4 additions & 4 deletions docs/source/cpp_api/cluster_kmeans.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ K-Means
:language: c++
:class: highlight

Params
------
Parameters
----------

``#include <cuvs/cluster/kmeans.hpp>``

Expand All @@ -21,7 +21,7 @@ namespace *cuvs::cluster::kmeans*
K-means
-------

``include <cuvs/cluster/kmeans.hpp>``
``#include <cuvs/cluster/kmeans.hpp>``

namespace *cuvs::cluster::kmeans*

Expand All @@ -34,7 +34,7 @@ namespace *cuvs::cluster::kmeans*
K-means Helpers
---------------

``include <cuvs/cluster/kmeans.hpp>``
``#include <cuvs/cluster/kmeans.hpp>``

namespace *cuvs::cluster::kmeans::helpers*

Expand Down
2 changes: 1 addition & 1 deletion docs/source/cpp_api/distance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace *cuvs::distance*
Pairwise Distances
------------------

``include <cuvs/distance/distance.hpp>``
``#include <cuvs/distance/distance.hpp>``

namespace *cuvs::distance*

Expand Down
2 changes: 1 addition & 1 deletion docs/source/cpp_api/neighbors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Nearest Neighbors
neighbors_hnsw.rst
neighbors_ivf_flat.rst
neighbors_ivf_pq.rst
neighbors_mg.rst
neighbors_nn_descent.rst
neighbors_refine.rst
neighbors_mg.rst
neighbors_vamana.rst
8 changes: 4 additions & 4 deletions docs/source/cpp_api/neighbors_all_neighbors.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
All-neighbors
All-Neighbors
=============

All-neighbors allows building an approximate all-neighbors knn graph. Given a full dataset, it finds nearest neighbors for all the training vectors in the dataset.
All-Neighbors allows building an approximate all-neighbors knn graph. Given a full dataset, it finds nearest neighbors for all the training vectors in the dataset.

.. role:: py(code)
:language: c++
Expand All @@ -11,8 +11,8 @@ All-neighbors allows building an approximate all-neighbors knn graph. Given a fu

namespace *cuvs::neighbors::all_neighbors*

All neighbors knn graph build parameters
----------------------------------------
Build Parameters
----------------

.. doxygengroup:: all_neighbors_cpp_params
:project: cuvs
Expand Down
6 changes: 3 additions & 3 deletions docs/source/cpp_api/neighbors_mg.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Distributed ANN
===============
Multi-GPU Nearest Neighbors
===========================

The SNMG (single-node multi-GPUs) ANN API provides a set of functions to deploy ANN indexes on multiple GPUs.
The Multi-GPU (SNMG - single-node multi-GPUs) nearest neighbors API provides a set of functions to deploy ANN indexes across multiple GPUs for improved performance and scalability.

.. role:: py(code)
:language: c++
Expand Down
2 changes: 1 addition & 1 deletion docs/source/cpp_api/preprocessing_pca.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Principal Component Analysis (PCA) is a linear dimensionality reduction techniqu

namespace *cuvs::preprocessing::pca*

Params
Parameters
----------

.. doxygenstruct:: cuvs::preprocessing::pca::params
Expand Down
30 changes: 18 additions & 12 deletions docs/source/cpp_api/preprocessing_quantize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,17 @@ This page provides C++ class references for the publicly-exposed elements of the
:language: c++
:class: highlight

Scalar
------

``#include <cuvs/preprocessing/quantize/scalar.hpp>``

namespace *cuvs::preprocessing::quantize::scalar*

.. doxygengroup:: scalar
:project: cuvs

Binary
------
Binary Quantizer
----------------

``#include <cuvs/preprocessing/quantize/binary.hpp>``

namespace *cuvs::preprocessing::quantize::binary*

.. doxygengroup:: binary
:project: cuvs
:members:
:content-only:

Product Quantizer
-----------------
Expand All @@ -37,3 +29,17 @@ namespace *cuvs::preprocessing::quantize::pq*

.. doxygengroup:: pq
:project: cuvs
:members:
:content-only:

Scalar Quantizer
----------------

``#include <cuvs/preprocessing/quantize/scalar.hpp>``

namespace *cuvs::preprocessing::quantize::scalar*

.. doxygengroup:: scalar
:project: cuvs
:members:
:content-only:
4 changes: 2 additions & 2 deletions docs/source/cpp_api/preprocessing_spectral_embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ namespace *cuvs::preprocessing::spectral_embedding*
:project: cuvs
:members:

Functions
---------
Spectral Embedding
------------------

``#include <cuvs/preprocessing/spectral_embedding.hpp>``

Expand Down
4 changes: 3 additions & 1 deletion docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ Blogs

We frequently publish blogs on GPU-enabled vector search, which can provide great deep dives into various important topics and breakthroughs:

#. `See all cuVS blogs <https://developer.nvidia.com/blog/recent-posts/?products=cuVS>`_
#. `Accelerated Vector Search: Approximating with cuVS IVF-Flat <https://developer.nvidia.com/blog/accelerated-vector-search-approximating-with-rapids-raft-ivf-flat/>`_
#. `Accelerating Vector Search with cuVS IVF-PQ <https://developer.nvidia.com/blog/accelerating-vector-search-rapids-cuvs-ivf-pq-deep-dive-part-1/>`_
#. Accelerating Vector Search with cuVS IVF-PQ (`Part 1 <https://developer.nvidia.com/blog/accelerating-vector-search-rapids-cuvs-ivf-pq-deep-dive-part-1/>`_, `Part 2 <https://developer.nvidia.com/blog/accelerating-vector-search-nvidia-cuvs-ivf-pq-performance-tuning-part-2/>`_)

Research
--------
Expand All @@ -99,6 +100,7 @@ For the interested reader, many of the accelerated implementations in cuVS are a
#. `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>`_
#. `cuSLINK: Single-linkage Agglomerative Clustering on the GPU <https://arxiv.org/abs/2306.16354>`_
#. `GPU Semiring Primitives for Sparse Neighborhood Methods <https://arxiv.org/abs/2104.06357>`_
#. `VecFlow: A High-Performance Vector Data Management System for Filtered-Search on GPUs <https://arxiv.org/abs/2506.00812>`_


Get involved
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ There are several benefits to using cuVS and GPUs for vector search, including
6. Multiple language support
7. Building blocks for composing new or accelerating existing algorithms

In addition to the items above, cuVS shoulders the responsibility of keeping non-trivial accelerated code up to date as new NVIDIA architectures and CUDA versions are released. This provides a deslightful development experimence, guaranteeing that any libraries, databases, or applications built on top of it will always be receiving the best performance and scale.
In addition to the items above, cuVS shoulders the responsibility of keeping non-trivial accelerated code up to date as new NVIDIA architectures and CUDA versions are released. This provides a delightful development experience, guaranteeing that any libraries, databases, or applications built on top of it will always be receiving the best performance and scale.

cuVS Technology Stack
#####################
Expand Down
17 changes: 3 additions & 14 deletions docs/source/python_api/neighbors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,15 @@ Nearest Neighbors
:language: python
:class: highlight

Single-GPU Algorithms
#####################

.. toctree::
:maxdepth: 2
:caption: Single-GPU ANN Algorithms:
:caption: Contents:

neighbors_all_neighbors.rst
neighbors_brute_force.rst
neighbors_cagra.rst
neighbors_hnsw.rst
neighbors_ivf_flat.rst
neighbors_ivf_pq.rst
neighbors_nn_decent.rst

Multi-GPU Algorithms
####################

.. toctree::
:maxdepth: 2
:caption: Multi-GPU Distributed ANN:

neighbors_multi_gpu.rst
neighbors_all_neighbors.rst
neighbors_nn_decent.rst
Loading
Loading