VamanaIndex
Java package: com.nvidia.cuvs
VamanaIndex encapsulates a Vamana index, along with methods to build
it on the GPU and serialize it in the DiskANN file format.
Vamana is the graph construction algorithm behind DiskANN. cuVS currently provides build and serialize only. There is no Vamana search API, so a serialized index is searched by loading it with DiskANN.
Public Members
getDimensions
Gets the dimensionality of the vectors in this index.
Returns
the number of dimensions
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:30
serialize
Serializes the index in the DiskANN file format, including the dataset.
This writes two files, filePrefix holding the graph and
filePrefix + ".data" holding the dataset.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:40
serialize
Serializes the index in the DiskANN file format.
When includeDataset is true this writes filePrefix holding
the graph and filePrefix + ".data" holding the dataset. When it is
false only filePrefix is written.
The argument is a prefix and not a complete file name, matching the native
file_prefix parameter.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:57
getCuVSResources
Gets an instance of CuVSResources
Returns
an instance of CuVSResources
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:64
newBuilder
Creates a new Builder with an instance of CuVSResources.
Parameters
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:72
withDataset
Sets the dataset for building the VamanaIndex.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:88
withDataset
Sets the dataset for building the VamanaIndex.
The native builder accepts float, half, uint8,
and int8 datasets. Of those, CuVSMatrix.DataType#FLOAT,
CuVSMatrix.DataType#HALF, and CuVSMatrix.DataType#BYTE
are reachable from Java today, where BYTE is unsigned.
int8 has no corresponding DataType.
The native index may retain a non-owning device view of the dataset
rather than copying it, so the caller must keep this matrix open for at
least as long as the index and close it afterwards. A dataset supplied as
a float[][] is created and closed by the index instead.
Parameters
Returns
an instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:107
withIndexParams
Registers an instance of configured VamanaIndexParams with this
Builder.
Parameters
Returns
An instance of this Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:116
build
Builds and returns an instance of VamanaIndex.
Returns
an instance of VamanaIndex
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:123
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/VamanaIndex.java:21