Skip to main content

Crate cuvs_sys

Crate cuvs_sys 

Source
Expand description

Raw FFI bindings to libcuvs_c.

Structs§

CUstream_st
Opaque CUDA stream handle used by the current cuVS C ABI.
DLDataType
\brief The data type the tensor can hold. The data type is assumed to follow the native endian-ness. An explicit error message should be raised when attempting to export an array with non-native endianness
DLDevice
\brief A Device for Tensor and operator.
DLManagedTensor
\brief C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowing of DLTensor by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn’t need the tensor, it should call the deleter to notify the host that the resource is no longer needed.
DLTensor
\brief Plain C Tensor object, does not manage memory.
cudaDataType_t
Temporary ABI shim for cudaDataType_t while the cuVS C API exposes CUDA types. TODO: Remove this once the cuVS C API removes cudaDataType_t reliance.
cuvsAceParams
Parameters for ACE (Augmented Core Extraction) graph build. ACE enables building indexes for datasets too large to fit in GPU memory by:
cuvsAllNeighborsIndexParams
@brief Parameters controlling SNMG all-neighbors build.
cuvsBinaryQuantizer
@brief Defines and stores threshold for quantization upon training
cuvsBinaryQuantizerParams
@brief Binary quantizer parameters.
cuvsBruteForceIndex
@defgroup bruteforce_c_index Bruteforce index @{ / /** @brief Struct to hold address of cuvs::neighbors::brute_force::index and its active trained dtype
cuvsCagraCompressionParams
Parameters for VPQ compression.
cuvsCagraExtendParams
@defgroup cagra_c_extend_params C API for CUDA ANN Graph-based nearest neighbor search @{ / /** @brief Supplemental parameters to extend CAGRA Index
cuvsCagraIndex
@brief Struct to hold address of cuvs::neighbors::cagra::index and its active trained dtype
cuvsCagraIndexParams
@brief Supplemental parameters to build CAGRA Index
cuvsCagraSearchParams
@brief Supplemental parameters to search CAGRA index
cuvsFilter
@brief Struct to hold address of cuvs::neighbors::prefilter and its type
cuvsHnswAceParams
Parameters for ACE (Augmented Core Extraction) graph build for HNSW. ACE enables building indexes for datasets too large to fit in GPU memory by:
cuvsHnswExtendParams
@defgroup hnsw_c_extend_params Parameters for extending HNSW index @{
cuvsHnswIndex
@brief Struct to hold address of cuvs::neighbors::Hnsw::index and its active trained dtype
cuvsHnswIndexParams
cuvsHnswSearchParams
@defgroup hnsw_c_search_params C API for hnswlib wrapper search params @{
cuvsIvfFlatIndex
@defgroup ivf_flat_c_index IVF-Flat index @{ / /** @brief Struct to hold address of cuvs::neighbors::ivf_flat::index and its active trained dtype
cuvsIvfFlatIndexParams
@defgroup ivf_flat_c_index_params IVF-Flat index build parameters @{ / /** @brief Supplemental parameters to build IVF-Flat Index
cuvsIvfFlatSearchParams
@defgroup ivf_flat_c_search_params IVF-Flat index search parameters @{ / /** @brief Supplemental parameters to search IVF-Flat index
cuvsIvfPqIndex
@defgroup ivf_pq_c_index IVF-PQ index @{ / /** @brief Struct to hold address of cuvs::neighbors::ivf_pq::index and its active trained dtype
cuvsIvfPqIndexParams
@brief Supplemental parameters to build IVF-PQ Index
cuvsIvfPqParams
cuvsIvfPqSearchParams
@defgroup ivf_pq_c_search_params IVF-PQ index search parameters @{ / /** @brief Supplemental parameters to search IVF-PQ index
cuvsKMeansParams
@brief Hyper-parameters for the kmeans algorithm
cuvsMultiGpuCagraIndex
@brief Struct to hold address of cuvs::neighbors::mg_indexcagra::index and its active trained dtype
cuvsMultiGpuCagraIndexParams
@brief Multi-GPU parameters to build CAGRA Index
cuvsMultiGpuCagraSearchParams
@brief Multi-GPU parameters to search CAGRA index
cuvsMultiGpuIvfFlatIndex
@brief Struct to hold address of cuvs::neighbors::mg_index<ivf_flat::index> and its active trained dtype
cuvsMultiGpuIvfFlatIndexParams
@brief Multi-GPU parameters to build IVF-Flat Index
cuvsMultiGpuIvfFlatSearchParams
@brief Multi-GPU parameters to search IVF-Flat index
cuvsMultiGpuIvfPqIndex
@brief Struct to hold address of cuvs::neighbors::mg_index<ivf_pq::index> and its active trained dtype
cuvsMultiGpuIvfPqIndexParams
@brief Multi-GPU parameters to build IVF-PQ Index
cuvsMultiGpuIvfPqSearchParams
@brief Multi-GPU parameters to search IVF-PQ index
cuvsNNDescentIndex
@defgroup nn_descent_c_index NN-Descent index @{ / /** @brief Struct to hold address of cuvs::neighbors::nn_descent::index and its active trained dtype
cuvsNNDescentIndexParams
@defgroup nn_descent_c_index_params The nn-descent algorithm parameters. @{ / /** @brief Parameters used to build an nn-descent index
cuvsPcaParams
@brief Parameters for PCA decomposition.
cuvsProductQuantizer
@brief Defines and stores product quantizer upon training
cuvsProductQuantizerParams
@defgroup preprocessing_c_pq C API for Product Quantizer @{ / /** @brief Product quantizer parameters.
cuvsScalarQuantizer
@brief Defines and stores scalar for quantisation upon training
cuvsScalarQuantizerParams
@defgroup preprocessing_c_scalar C API for Scalar Quantizer @{ / /** @brief Scalar quantizer parameters.
cuvsTieredIndex
@defgroup tiered_index_c_index Tiered Index @{ / /** @brief Struct to hold address of cuvs::neighbors::tiered_index::index and its active trained dtype
cuvsTieredIndexParams
@defgroup tiered_c_index_params Tiered Index build parameters @{ / /** @brief Supplemental parameters to build a TieredIndex
cuvsVamanaIndex
@brief Struct to hold address of cuvs::neighbors::vamana::index and its active trained dtype
cuvsVamanaIndexParams
@brief Supplemental parameters to build Vamana Index

Enums§

DLDataTypeCode
\brief The type code options DLDataType.
DLDeviceType
cuvsAllNeighborsAlgo
@brief Graph build algorithm selection.
cuvsBinaryQuantizerThreshold
@defgroup preprocessing_c_binary C API for Binary Quantizer @{ / /** @brief In the cuvsBinaryQuantizerTransform function, a bit is set if the corresponding element in the dataset vector is greater than the corresponding element in the threshold vector. The mean and sampling_median thresholds are calculated separately for each dimension.
cuvsCagraGraphBuildAlgo
@brief Enum to denote which ANN algorithm is used to build CAGRA graph
cuvsCagraHashMode
@brief Enum to denote Hash Mode used while searching CAGRA index
cuvsCagraHnswHeuristicType
@brief A strategy for selecting the graph build parameters based on similar HNSW index parameters.
cuvsCagraSearchAlgo
@brief Enum to denote algorithm used to search CAGRA Index
cuvsDistanceType
enum to tell how to compute distance
cuvsError_t
@defgroup error_c cuVS Error Messages @{ / /** @brief An enum denoting error statuses for function calls
cuvsFilterType
@brief Enum to denote filter type.
cuvsHnswHierarchy
@brief Hierarchy for HNSW index when converting from CAGRA index
cuvsIvfPqCodebookGen
@defgroup ivf_pq_c_index_params IVF-PQ index build parameters @{ / /** @brief A type for specifying how PQ codebooks are created
cuvsIvfPqListLayout
@brief A type for specifying the memory layout of IVF-PQ list data
cuvsKMeansInitMethod
@defgroup kmeans_c_params k-means hyperparameters @{
cuvsKMeansType
@brief Type of k-means algorithm.
cuvsLogLevel_t
@brief An enum denoting log levels
cuvsMergeStrategy
@brief Strategy for merging indices.
cuvsMultiGpuDistributionMode
@brief Distribution mode for multi-GPU indexes
cuvsMultiGpuReplicatedSearchMode
@brief Search mode when using a replicated index
cuvsMultiGpuShardedMergeMode
@brief Merge mode when using a sharded index
cuvsNNDescentDistCompDtype
@brief Dtype to use for distance computation
cuvsPcaSolver
@brief Solver algorithm for PCA eigen decomposition.
cuvsTieredIndexANNAlgo
@brief Enum to hold which ANN algorithm is being used in the tiered index

Functions§

cuvsAceParamsCreate
@brief Allocate ACE params, and populate with default values
cuvsAceParamsDestroy
@brief De-allocate ACE params
cuvsAllNeighborsBuild
@brief Build an all-neighbors k-NN graph automatically detecting host vs device dataset.
cuvsAllNeighborsIndexParamsCreate
@brief Create a default all-neighbors index parameters struct.
cuvsAllNeighborsIndexParamsDestroy
@brief Destroy an all-neighbors index parameters struct.
cuvsBinaryQuantizerCreate
@brief Allocate Binary Quantizer and populate with default values
cuvsBinaryQuantizerDestroy
@brief De-allocate Binary Quantizer
cuvsBinaryQuantizerParamsCreate
@brief Allocate Binary Quantizer params, and populate with default values
cuvsBinaryQuantizerParamsDestroy
@brief De-allocate Binary Quantizer params
cuvsBinaryQuantizerTrain
@brief Trains a binary quantizer to be used later for quantizing the dataset.
cuvsBinaryQuantizerTransform
@brief Applies binary quantization transform to the given dataset
cuvsBinaryQuantizerTransformWithParams
@brief Applies binary quantization transform to the given dataset
cuvsBruteForceBuild
@defgroup bruteforce_c_index_build Bruteforce index build @{ / /** @brief Build a BRUTEFORCE index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are: 1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16
cuvsBruteForceDeserialize
Load index from file. The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
cuvsBruteForceIndexCreate
@brief Allocate BRUTEFORCE index
cuvsBruteForceIndexDestroy
@brief De-allocate BRUTEFORCE index
cuvsBruteForceSearch
@defgroup bruteforce_c_index_search Bruteforce index search @{ / /** @brief Search a BRUTEFORCE index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged. It is also important to note that the BRUTEFORCE index must have been built with the same type of queries, such that index.dtype.code == queries.dl_tensor.dtype.code Types for input are: 1. queries: kDLDataType.code == kDLFloat and kDLDataType.bits = 32 or kDLDataType.bits = 16 2. neighbors: kDLDataType.code == kDLUInt and kDLDataType.bits = 32 3. distances: kDLDataType.code == kDLFloat and kDLDataType.bits = 32
cuvsBruteForceSerialize
@defgroup bruteforce_c_index_serialize BRUTEFORCE C-API serialize functions @{ / /** Save the index to file. The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
cuvsCagraBuild
@brief Build a CAGRA index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are: 1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16 3. kDLDataType.code == kDLInt and kDLDataType.bits = 8 4. kDLDataType.code == kDLUInt and kDLDataType.bits = 8
cuvsCagraCompressionParamsCreate
@brief Allocate CAGRA Compression params, and populate with default values
cuvsCagraCompressionParamsDestroy
@brief De-allocate CAGRA Compression params
cuvsCagraDeserialize
Load index from file.
cuvsCagraExtend
@brief Extend a CAGRA index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are: 1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16 3. kDLDataType.code == kDLInt and kDLDataType.bits = 8 4. kDLDataType.code == kDLUInt and kDLDataType.bits = 8
cuvsCagraExtendParamsCreate
@brief Allocate CAGRA Extend params, and populate with default values
cuvsCagraExtendParamsDestroy
@brief De-allocate CAGRA Extend params
cuvsCagraIndexCreate
@brief Allocate CAGRA index
cuvsCagraIndexDestroy
@brief De-allocate CAGRA index
cuvsCagraIndexFromArgs
Load index from a dataset and graph
cuvsCagraIndexGetDataset
@brief Returns a view of the CAGRA dataset
cuvsCagraIndexGetDims
@brief Get dimension of the CAGRA index
cuvsCagraIndexGetGraph
@brief Returns a view of the CAGRA graph
cuvsCagraIndexGetGraphDegree
@brief Get graph degree of the CAGRA index
cuvsCagraIndexGetSize
@brief Get size of the CAGRA index
cuvsCagraIndexParamsCreate
@brief Allocate CAGRA Index params, and populate with default values
cuvsCagraIndexParamsDestroy
@brief De-allocate CAGRA Index params
cuvsCagraIndexParamsFromHnswParams
@brief Create CAGRA index parameters similar to an HNSW index
cuvsCagraMerge
@brief Merge multiple CAGRA indices into a single CAGRA index.
cuvsCagraSearch
@defgroup cagra_c_index_search C API for CUDA ANN Graph-based nearest neighbor search @{ / /** @brief Search a CAGRA index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged. It is also important to note that the CAGRA Index must have been built with the same type of queries, such that index.dtype.code == queries.dl_tensor.dtype.code Types for input are: 1. queries: a. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 b. kDLDataType.code == kDLFloat and kDLDataType.bits = 16 c. kDLDataType.code == kDLInt and kDLDataType.bits = 8 d. kDLDataType.code == kDLUInt and kDLDataType.bits = 8 2. neighbors: kDLDataType.code == kDLUInt and kDLDataType.bits = 32 or kDLDataType.code == kDLInt and kDLDataType.bits = 64 3. distances: kDLDataType.code == kDLFloat and kDLDataType.bits = 32
cuvsCagraSearchParamsCreate
@brief Allocate CAGRA search params, and populate with default values
cuvsCagraSearchParamsDestroy
@brief De-allocate CAGRA search params
cuvsCagraSerialize
@defgroup cagra_c_index_serialize CAGRA C-API serialize functions @{ / /** Save the index to file.
cuvsCagraSerializeToHnswlib
Save the CAGRA index to file in hnswlib format. NOTE: The saved index can only be read by the hnswlib wrapper in cuVS, as the serialization format is not compatible with the original hnswlib.
cuvsDeviceIdGet
@brief Get the id of the device associated with this cuvsResources_t
cuvsGetLastErrorText
@brief Returns a string describing the last seen error on this thread, or NULL if the last function succeeded.
cuvsGetLogLevel
@brief Returns the current log level
cuvsHnswAceParamsCreate
@brief Allocate HNSW ACE params, and populate with default values
cuvsHnswAceParamsDestroy
@brief De-allocate HNSW ACE params
cuvsHnswBuild
@brief Build an HNSW index using ACE (Augmented Core Extraction) algorithm.
cuvsHnswDeserialize
Load hnswlib index from file which was serialized from a HNSW index. NOTE: When hierarchy is NONE, the loaded hnswlib index is immutable, and only be read by the hnswlib wrapper in cuVS, as the serialization format is not compatible with the original hnswlib. Experimental, both the API and the serialization format are subject to change.
cuvsHnswExtend
@brief Add new vectors to an HNSW index NOTE: The HNSW index can only be extended when the hierarchy is CPU when converting from a CAGRA index.
cuvsHnswExtendParamsCreate
@brief Allocate HNSW extend params, and populate with default values
cuvsHnswExtendParamsDestroy
@brief De-allocate HNSW extend params
cuvsHnswFromCagra
@brief Convert a CAGRA Index to an HNSW index. NOTE: When hierarchy is: 1. NONE: This method uses the filesystem to write the CAGRA index in /tmp/<random_number>.bin before reading it as an hnswlib index, then deleting the temporary file. The returned index is immutable and can only be searched by the hnswlib wrapper in cuVS, as the format is not compatible with the original hnswlib. 2. CPU: The returned index is mutable and can be extended with additional vectors. The serialized index is also compatible with the original hnswlib library.
cuvsHnswFromCagraWithDataset
cuvsHnswIndexCreate
@brief Allocate HNSW index
cuvsHnswIndexDestroy
@brief De-allocate HNSW index
cuvsHnswIndexParamsCreate
@brief Allocate HNSW Index params, and populate with default values
cuvsHnswIndexParamsDestroy
@brief De-allocate HNSW Index params
cuvsHnswSearch
@defgroup hnsw_c_index_search C API for CUDA ANN Graph-based nearest neighbor search @{ / /** @brief Search a HNSW index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCPU, kDLCUDAHost, or kDLCUDAManaged. It is also important to note that the HNSW Index must have been built with the same type of queries, such that index.dtype.code == queries.dl_tensor.dtype.code Supported types for input are: 1. queries: a. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 b. kDLDataType.code == kDLInt and kDLDataType.bits = 8 c. kDLDataType.code == kDLUInt and kDLDataType.bits = 8 2. neighbors: kDLDataType.code == kDLUInt and kDLDataType.bits = 64 3. distances: kDLDataType.code == kDLFloat and kDLDataType.bits = 32 NOTE: When hierarchy is NONE, the HNSW index can only be searched by the hnswlib wrapper in cuVS, as the format is not compatible with the original hnswlib.
cuvsHnswSearchParamsCreate
@brief Allocate HNSW search params, and populate with default values
cuvsHnswSearchParamsDestroy
@brief De-allocate HNSW search params
cuvsHnswSerialize
@brief Serialize a CAGRA index to a file as an hnswlib index NOTE: When hierarchy is NONE, the saved hnswlib index is immutable and can only be read by the hnswlib wrapper in cuVS, as the serialization format is not compatible with the original hnswlib. However, when hierarchy is CPU, the saved hnswlib index is compatible with the original hnswlib library.
cuvsIvfFlatBuild
@defgroup ivf_flat_c_index_build IVF-Flat index build @{ / /** @brief Build a IVF-Flat index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are: 1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. kDLDataType.code == kDLInt and kDLDataType.bits = 8 3. kDLDataType.code == kDLUInt and kDLDataType.bits = 8
cuvsIvfFlatDeserialize
Load index from file.
cuvsIvfFlatExtend
@defgroup ivf_flat_c_index_extend IVF-Flat index extend @{ / /** @brief Extend the index with the new data.
cuvsIvfFlatIndexCreate
@brief Allocate IVF-Flat index
cuvsIvfFlatIndexDestroy
@brief De-allocate IVF-Flat index
cuvsIvfFlatIndexGetCenters
@brief Get the cluster centers corresponding to the lists [n_lists, dim]
cuvsIvfFlatIndexGetDim
Get the dimensionality of the data
cuvsIvfFlatIndexGetNLists
Get the number of clusters/inverted lists
cuvsIvfFlatIndexParamsCreate
@brief Allocate IVF-Flat Index params, and populate with default values
cuvsIvfFlatIndexParamsDestroy
@brief De-allocate IVF-Flat Index params
cuvsIvfFlatSearch
@defgroup ivf_flat_c_index_search IVF-Flat index search @{ / /** @brief Search a IVF-Flat index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged. It is also important to note that the IVF-Flat Index must have been built with the same type of queries, such that index.dtype.code == queries.dl_tensor.dtype.code Types for input are: 1. queries: kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. neighbors: kDLDataType.code == kDLUInt and kDLDataType.bits = 32 3. distances: kDLDataType.code == kDLFloat and kDLDataType.bits = 32
cuvsIvfFlatSearchParamsCreate
@brief Allocate IVF-Flat search params, and populate with default values
cuvsIvfFlatSearchParamsDestroy
@brief De-allocate IVF-Flat search params
cuvsIvfFlatSerialize
@defgroup ivf_flat_c_index_serialize IVF-Flat C-API serialize functions @{ / /** Save the index to file.
cuvsIvfPqBuild
@defgroup ivf_pq_c_index_build IVF-PQ index build @{ / /** @brief Build a IVF-PQ index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are: 1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16 3. kDLDataType.code == kDLInt and kDLDataType.bits = 8 4. kDLDataType.code == kDLUInt and kDLDataType.bits = 8
cuvsIvfPqBuildPrecomputed
@brief Build a view-type IVF-PQ index from device memory precomputed centroids and codebook.
cuvsIvfPqDeserialize
Load index from file.
cuvsIvfPqExtend
@defgroup ivf_pq_c_index_extend IVF-PQ index extend @{ / /** @brief Extend the index with the new data.
cuvsIvfPqIndexCreate
@brief Allocate IVF-PQ index
cuvsIvfPqIndexDestroy
@brief De-allocate IVF-PQ index
cuvsIvfPqIndexGetCenters
@brief Get the cluster centers corresponding to the lists in the original space
cuvsIvfPqIndexGetCentersPadded
@brief Get the padded cluster centers [n_lists, dim_ext] where dim_ext = round_up(dim + 1, 8)
cuvsIvfPqIndexGetCentersRot
@brief Get the rotated cluster centers [n_lists, rot_dim] where rot_dim = pq_len * pq_dim
cuvsIvfPqIndexGetDim
Get the dimensionality
cuvsIvfPqIndexGetListIndices
@brief Get the indices of each vector in a ivf-pq list
cuvsIvfPqIndexGetListSizes
@brief Get the sizes of each list
cuvsIvfPqIndexGetNLists
Get the number of clusters/inverted lists
cuvsIvfPqIndexGetPqBits
Get the bit length of an encoded vector element after compression by PQ.
cuvsIvfPqIndexGetPqCenters
@brief Get the PQ cluster centers
cuvsIvfPqIndexGetPqDim
Get the dimensionality of an encoded vector after compression by PQ.
cuvsIvfPqIndexGetPqLen
Get the Dimensionality of a subspace, i.e. the number of vector components mapped to a subspace
cuvsIvfPqIndexGetRotationMatrix
@brief Get the rotation matrix [rot_dim, dim] Transform matrix (original space -> rotated padded space)
cuvsIvfPqIndexGetSize
Get the size of the index
cuvsIvfPqIndexParamsCreate
@brief Allocate IVF-PQ Index params, and populate with default values
cuvsIvfPqIndexParamsDestroy
@brief De-allocate IVF-PQ Index params
cuvsIvfPqIndexUnpackContiguousListData
@brief Unpack n_rows consecutive PQ encoded vectors of a single list (cluster) in the compressed index starting at given offset, not expanded to one code per byte. Each code in the output buffer occupies ceildiv(index.pq_dim() * index.pq_bits(), 8) bytes.
cuvsIvfPqSearch
@defgroup ivf_pq_c_index_search IVF-PQ index search @{ / /** @brief Search a IVF-PQ index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged. It is also important to note that the IVF-PQ Index must have been built with the same type of queries, such that index.dtype.code == queries.dl_tensor.dtype.code Types for input are: 1. queries: kDLDataType.code == kDLFloat and kDLDataType.bits = 32 or kDLDataType.bits = 16 2. neighbors: kDLDataType.code == kDLUInt and kDLDataType.bits = 32 3. distances: kDLDataType.code == kDLFloat and kDLDataType.bits = 32
cuvsIvfPqSearchParamsCreate
@brief Allocate IVF-PQ search params, and populate with default values
cuvsIvfPqSearchParamsDestroy
@brief De-allocate IVF-PQ search params
cuvsIvfPqSerialize
@defgroup ivf_pq_c_index_serialize IVF-PQ C-API serialize functions @{ / /** Save the index to file.
cuvsIvfPqTransform
@defgroup ivf_pq_c_index_transform IVF-PQ index transform @{ / /** @brief Transform the input data by applying pq-encoding
cuvsKMeansClusterCost
@brief Compute cluster cost
cuvsKMeansFit
@brief Find clusters with k-means algorithm.
cuvsKMeansParamsCreate
@brief Allocate KMeans params, and populate with default values
cuvsKMeansParamsDestroy
@brief De-allocate KMeans params
cuvsKMeansPredict
@brief Predict the closest cluster each sample in X belongs to.
cuvsMatrixCopy
@brief Copy a matrix
cuvsMatrixSliceRows
@brief Slices rows from a matrix
cuvsMultiGpuCagraBuild
@brief Build a Multi-GPU CAGRA index
cuvsMultiGpuCagraDeserialize
@brief Deserialize a Multi-GPU CAGRA index from file
cuvsMultiGpuCagraDistribute
@brief Distribute a local CAGRA index to create a Multi-GPU index
cuvsMultiGpuCagraExtend
@brief Extend a Multi-GPU CAGRA index
cuvsMultiGpuCagraIndexCreate
@brief Allocate Multi-GPU CAGRA index
cuvsMultiGpuCagraIndexDestroy
@brief De-allocate Multi-GPU CAGRA index
cuvsMultiGpuCagraIndexParamsCreate
@brief Allocate Multi-GPU CAGRA Index params, and populate with default values
cuvsMultiGpuCagraIndexParamsDestroy
@brief De-allocate Multi-GPU CAGRA Index params
cuvsMultiGpuCagraSearch
@brief Search a Multi-GPU CAGRA index
cuvsMultiGpuCagraSearchParamsCreate
@brief Allocate Multi-GPU CAGRA search params, and populate with default values
cuvsMultiGpuCagraSearchParamsDestroy
@brief De-allocate Multi-GPU CAGRA search params
cuvsMultiGpuCagraSerialize
@brief Serialize a Multi-GPU CAGRA index to file
cuvsMultiGpuIvfFlatBuild
@brief Build a Multi-GPU IVF-Flat index
cuvsMultiGpuIvfFlatDeserialize
@brief Deserialize a Multi-GPU IVF-Flat index from file
cuvsMultiGpuIvfFlatDistribute
@brief Distribute a local IVF-Flat index to create a Multi-GPU index
cuvsMultiGpuIvfFlatExtend
@brief Extend a Multi-GPU IVF-Flat index
cuvsMultiGpuIvfFlatIndexCreate
@brief Allocate Multi-GPU IVF-Flat index
cuvsMultiGpuIvfFlatIndexDestroy
@brief De-allocate Multi-GPU IVF-Flat index
cuvsMultiGpuIvfFlatIndexParamsCreate
@brief Allocate Multi-GPU IVF-Flat Index params, and populate with default values
cuvsMultiGpuIvfFlatIndexParamsDestroy
@brief De-allocate Multi-GPU IVF-Flat Index params
cuvsMultiGpuIvfFlatSearch
@brief Search a Multi-GPU IVF-Flat index
cuvsMultiGpuIvfFlatSearchParamsCreate
@brief Allocate Multi-GPU IVF-Flat search params, and populate with default values
cuvsMultiGpuIvfFlatSearchParamsDestroy
@brief De-allocate Multi-GPU IVF-Flat search params
cuvsMultiGpuIvfFlatSerialize
@brief Serialize a Multi-GPU IVF-Flat index to file
cuvsMultiGpuIvfPqBuild
@brief Build a Multi-GPU IVF-PQ index
cuvsMultiGpuIvfPqDeserialize
@brief Deserialize a Multi-GPU IVF-PQ index from file
cuvsMultiGpuIvfPqDistribute
@brief Distribute a local IVF-PQ index to create a Multi-GPU index
cuvsMultiGpuIvfPqExtend
@brief Extend a Multi-GPU IVF-PQ index
cuvsMultiGpuIvfPqIndexCreate
@brief Allocate Multi-GPU IVF-PQ index
cuvsMultiGpuIvfPqIndexDestroy
@brief De-allocate Multi-GPU IVF-PQ index
cuvsMultiGpuIvfPqIndexParamsCreate
@brief Allocate Multi-GPU IVF-PQ Index params, and populate with default values
cuvsMultiGpuIvfPqIndexParamsDestroy
@brief De-allocate Multi-GPU IVF-PQ Index params
cuvsMultiGpuIvfPqSearch
@brief Search a Multi-GPU IVF-PQ index
cuvsMultiGpuIvfPqSearchParamsCreate
@brief Allocate Multi-GPU IVF-PQ search params, and populate with default values
cuvsMultiGpuIvfPqSearchParamsDestroy
@brief De-allocate Multi-GPU IVF-PQ search params
cuvsMultiGpuIvfPqSerialize
@brief Serialize a Multi-GPU IVF-PQ index to file
cuvsMultiGpuResourcesCreate
@brief Create an Initialized opaque C handle for C++ type raft::device_resources_snmg for multi-GPU operations
cuvsMultiGpuResourcesCreateWithDeviceIds
@brief Create an Initialized opaque C handle for C++ type raft::device_resources_snmg for multi-GPU operations with specific device IDs
cuvsMultiGpuResourcesDestroy
@brief Destroy and de-allocate opaque C handle for C++ type raft::device_resources_snmg
cuvsMultiGpuResourcesSetMemoryPool
@brief Set a memory pool on all devices managed by the multi-GPU resources
cuvsNNDescentBuild
@defgroup nn_descent_c_index_build NN-Descent index build @{ / /** @brief Build a NN-Descent index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are: 1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16 3. kDLDataType.code == kDLInt and kDLDataType.bits = 8 4. kDLDataType.code == kDLUInt and kDLDataType.bits = 8
cuvsNNDescentIndexCreate
@brief Allocate NN-Descent index
cuvsNNDescentIndexDestroy
@brief De-allocate NN-Descent index
cuvsNNDescentIndexGetDistances
@brief Get the distances from a build NN_Descent index
cuvsNNDescentIndexGetGraph
@brief Get the KNN graph from a built NN-Descent index
cuvsNNDescentIndexParamsCreate
@brief Allocate NN-Descent Index params, and populate with default values
cuvsNNDescentIndexParamsDestroy
@brief De-allocate NN-Descent Index params
cuvsPairwiseDistance
@brief Compute pairwise distances for two matrices
cuvsPcaFit
@brief Perform PCA fit operation.
cuvsPcaFitTransform
@brief Perform PCA fit and transform in a single operation.
cuvsPcaInverseTransform
@brief Perform PCA inverse transform operation.
cuvsPcaParamsCreate
@brief Allocate PCA params and populate with default values.
cuvsPcaParamsDestroy
@brief De-allocate PCA params.
cuvsPcaTransform
@brief Perform PCA transform operation.
cuvsProductQuantizerBuild
@brief Builds a product quantizer to be used later for quantizing the dataset.
cuvsProductQuantizerCreate
@brief Allocate Product Quantizer
cuvsProductQuantizerDestroy
@brief De-allocate Product Quantizer
cuvsProductQuantizerGetEncodedDim
@brief Get the encoded dimension of the quantized dataset.
cuvsProductQuantizerGetPqBits
@brief Get the bit length of the vector element after compression by PQ.
cuvsProductQuantizerGetPqCodebook
@brief Get the PQ codebook.
cuvsProductQuantizerGetPqDim
@brief Get the dimensionality of the vector after compression by PQ.
cuvsProductQuantizerGetUseVq
@brief Get whether VQ is used.
cuvsProductQuantizerGetVqCodebook
@brief Get the VQ codebook.
cuvsProductQuantizerInverseTransform
@brief Applies product quantization inverse transform to the given quantized codes
cuvsProductQuantizerParamsCreate
@brief Allocate Product Quantizer params, and populate with default values
cuvsProductQuantizerParamsDestroy
@brief De-allocate Product Quantizer params
cuvsProductQuantizerTransform
@brief Applies product quantization transform to the given dataset
cuvsRMMAlloc
@brief Allocates device memory using RMM
cuvsRMMFree
@brief Deallocates device memory using RMM
cuvsRMMHostAlloc
@brief Allocates pinned memory on the host using RMM @param[out] ptr Pointer to allocated host memory @param[in] bytes Size in bytes to allocate @return cuvsError_t
cuvsRMMHostFree
@brief Deallocates pinned memory on the host using RMM @param[in] ptr Pointer to allocated host memory to free @param[in] bytes Size in bytes to deallocate @return cuvsError_t
cuvsRMMMemoryResourceReset
@brief Resets the memory resource to use the default memory resource (cuda_memory_resource) @return cuvsError_t
cuvsRMMPoolMemoryResourceEnable
@brief Switches the working memory resource to use the RMM pool memory resource, which will bypass unnecessary synchronizations by allocating a chunk of device memory up front and carving that up for temporary memory allocations within algorithms. Be aware that this function will change the memory resource for the whole process and the new memory resource will be used until explicitly changed.
cuvsRefine
@defgroup ann_refine_c Approximate Nearest Neighbors Refinement C-API @{ / /** @brief Refine nearest neighbor search.
cuvsResourcesCreate
@brief Create an Initialized opaque C handle for C++ type raft::resources
cuvsResourcesDestroy
@brief Destroy and de-allocate opaque C handle for C++ type raft::resources
cuvsScalarQuantizerCreate
@brief Allocate Scalar Quantizer and populate with default values
cuvsScalarQuantizerDestroy
@brief De-allocate Scalar Quantizer
cuvsScalarQuantizerInverseTransform
@brief Perform inverse quantization step on previously quantized dataset
cuvsScalarQuantizerParamsCreate
@brief Allocate Scalar Quantizer params, and populate with default values
cuvsScalarQuantizerParamsDestroy
@brief De-allocate Scalar Quantizer params
cuvsScalarQuantizerTrain
@brief Trains a scalar quantizer to be used later for quantizing the dataset.
cuvsScalarQuantizerTransform
@brief Applies quantization transform to given dataset
cuvsSetLastErrorText
@brief Sets a string describing an error seen on the thread. Passing NULL clears any previously seen error message.
cuvsSetLogLevel
@brief Sets the log level
cuvsStreamGet
@brief Get the cudaStream_t from a cuvsResources_t
cuvsStreamSet
@brief Set cudaStream_t on cuvsResources_t to queue CUDA kernels on APIs that accept a cuvsResources_t handle
cuvsStreamSync
@brief Syncs the current CUDA stream on the resources object
cuvsTieredIndexBuild
@defgroup tieredindex_c_index_build Tiered index build @{ / /** @brief Build a TieredIndex index with a DLManagedTensor which has underlying DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are: 1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16
cuvsTieredIndexCreate
@brief Allocate Tiered Index
cuvsTieredIndexDestroy
@brief De-allocate Tiered index
cuvsTieredIndexExtend
@} / /** @defgroup tiered_c_index_extend Tiered index extend @{ / /** @brief Extend the index with the new data.
cuvsTieredIndexMerge
@defgroup tiered_c_index_merge Tiered index merge @{ / /** @brief Merge multiple indices together into a single index
cuvsTieredIndexParamsCreate
@brief Allocate Tiered Index Params and populate with default values
cuvsTieredIndexParamsDestroy
@brief De-allocate Tiered Index params
cuvsTieredIndexSearch
@defgroup tieredindex_c_index_search Tiered index search @{ / /** @brief Search a TieredIndex index with a DLManagedTensor
cuvsVamanaBuild
@brief Build Vamana index
cuvsVamanaIndexCreate
@brief Allocate Vamana index
cuvsVamanaIndexDestroy
@brief De-allocate Vamana index
cuvsVamanaIndexGetDims
@brief Get the dimension of the index
cuvsVamanaIndexParamsCreate
@brief Allocate Vamana Index params, and populate with default values
cuvsVamanaIndexParamsDestroy
@brief De-allocate Vamana Index params
cuvsVamanaSerialize
@brief Save Vamana index to file
cuvsVersionGet
@brief Get the version of the cuVS library @param[out] major Major version @param[out] minor Minor version @param[out] patch Patch version @return cuvsError_t

Type Aliases§

cudaStream_t
cuvsAceParams_t
cuvsAllNeighborsIndexParams_t
cuvsBinaryQuantizerParams_t
cuvsBinaryQuantizer_t
cuvsBruteForceIndex_t
cuvsCagraCompressionParams_t
cuvsCagraExtendParams_t
cuvsCagraIndexParams_t
cuvsCagraIndex_t
cuvsCagraSearchParams_t
cuvsHnswAceParams_t
cuvsHnswExtendParams_t
cuvsHnswIndexParams_t
cuvsHnswIndex_t
cuvsHnswSearchParams_t
cuvsIvfFlatIndexParams_t
cuvsIvfFlatIndex_t
cuvsIvfFlatSearchParams_t
cuvsIvfPqIndexParams_t
cuvsIvfPqIndex_t
cuvsIvfPqParams_t
cuvsIvfPqSearchParams_t
cuvsKMeansParams_t
cuvsMultiGpuCagraIndexParams_t
cuvsMultiGpuCagraIndex_t
cuvsMultiGpuCagraSearchParams_t
cuvsMultiGpuIvfFlatIndexParams_t
cuvsMultiGpuIvfFlatIndex_t
cuvsMultiGpuIvfFlatSearchParams_t
cuvsMultiGpuIvfPqIndexParams_t
cuvsMultiGpuIvfPqIndex_t
cuvsMultiGpuIvfPqSearchParams_t
cuvsNNDescentIndexParams_t
cuvsNNDescentIndex_t
cuvsPcaParams_t
cuvsProductQuantizerParams_t
cuvsProductQuantizer_t
cuvsResources_t
@brief An opaque C handle for C++ type raft::resources
cuvsScalarQuantizerParams_t
cuvsScalarQuantizer_t
cuvsTieredIndexParams_t
cuvsTieredIndex_t
cuvsVamanaIndexParams_t
cuvsVamanaIndex_t