Java package: com.nvidia.cuvs.spi
A provider of low-level cuvs resources and builders.
The temporary directory to use for intermediate operations. Defaults to {@systemProperty java.io.tmpdir}.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:22
The directory where to extract and install the native library. Defaults to {@systemProperty java.io.tmpdir}.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:30
Creates a new CuVSResources.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:35
Create a CuVSMatrix.Builder instance for a host memory matrix *
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:38
Create a CuVSMatrix.Builder instance for a host memory matrix *
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:42
Create a CuVSMatrix.Builder instance for a device memory matrix *
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:46
Create a CuVSMatrix.Builder instance for a device memory matrix *
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:50
Returns the factory method used to build a CuVSMatrix from native memory.
The factory method will have this signature:
CuVSMatrix createNativeMatrix(memorySegment, size, dimensions, dataType),
where memorySegment is a java.lang.foreign.MemorySegment containing int size vectors of
int dimensions length of type CuVSMatrix.DataType.
In order to expose this factory in a way that is compatible with Java 21, the factory method is returned as a
MethodHandle with MethodType equal to
(CuVSMatrix.class, MemorySegment.class, int.class, int.class, CuVSMatrix.DataType.class).
The caller will need to invoke the factory via the MethodHandle#invokeExact method:
var matrix = (CuVSMatrix)newNativeMatrixBuilder().invokeExact(memorySegment, size, dimensions, dataType)
Returns
a MethodHandle which can be invoked to build a CuVSMatrix from an external MemorySegment
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:73
Returns the factory method used to build a CuVSMatrix from native memory, with strides.
The factory method will have this signature:
CuVSMatrix createNativeMatrix(memorySegment, size, dimensions, rowStride, columnStride, dataType),
where memorySegment is a java.lang.foreign.MemorySegment containing int size vectors of
int dimensions length of type CuVSMatrix.DataType. Rows have a stride of rowStride,
where 0 indicates “no stride” (a stride equal to the number of columns), and columns have a stride of
columnStride
In order to expose this factory in a way that is compatible with Java 21, the factory method is returned as a
MethodHandle with MethodType equal to
(CuVSMatrix.class, MemorySegment.class, int.class, int.class, int.class, int.class, DataType.class).
The caller will need to invoke the factory via the MethodHandle#invokeExact method:
var matrix = (CuVSMatrix)newNativeMatrixBuilder().invokeExact(memorySegment, size, dimensions, rowStride, columnStride, dataType)
Returns
a MethodHandle which can be invoked to build a CuVSMatrix from an external MemorySegment
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:92
Create a CuVSMatrix from an on-heap array *
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:95
Create a CuVSMatrix from an on-heap array *
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:98
Create a CuVSMatrix from an on-heap array *
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:101
Creates a new BruteForceIndex Builder.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:104
Creates a new CagraIndex Builder.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:108
Creates a new HnswIndex Builder.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:112
Creates an HNSW index from an existing CAGRA index.
Parameters
Returns
A new HNSW index
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:123
Builds an HNSW index using the ACE (Augmented Core Extraction) algorithm.
Parameters
Returns
A new HNSW index ready for search
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:134
Creates a new TieredIndex Builder.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:138
Merges multiple CAGRA indexes into a single index.
Parameters
Returns
A new merged CAGRA index
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:148
Merges multiple CAGRA indexes into a single index with the specified merge parameters.
Parameters
Returns
A new merged CAGRA index
Throws
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:158
Returns a GPUInfoProvider to query the system for GPU related information
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:165
Switch RMM allocations (used internally by various cuVS algorithms and by the default implementation of
CuVSDeviceMatrix) to use pooled memory.
This operation has a global effect, and will affect all resources on the current device.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:179
Switch RMM allocations (used internally by various cuVS algorithms and by the default implementation of
CuVSDeviceMatrix) to use pooled memory.
This operation has a global effect, and will affect all resources on the current device.
Parameters
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:189
Disables pooled memory on the current device, reverting back to the default setting.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:192
Retrieves the system-wide provider.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:195
Create a CAGRA index parameters compatible with HNSW index
Note: The reference HNSW index and the corresponding from-CAGRA generated HNSW index will NOT produce
exactly the same recalls and QPS for the same parameter ef. The graphs are different
internally. Depending on the selected heuristics, the CAGRA-produced graph’s QPS-Recall curve
may be shifted along the curve right or left. See the heuristics descriptions for more details.
Parameters
Returns
A new CAGRA index parameters object
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:215
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/spi/CuVSProvider.java:15