HnswAceParams
Java package: com.nvidia.cuvs
Parameters for ACE (Augmented Core Extraction) graph build for HNSW. ACE enables building indexes for datasets too large to fit in GPU memory by:
- Partitioning the dataset in core and augmented partitions using balanced k-means
- Building sub-indexes for each partition independently
- Concatenating sub-graphs into a final unified index
Public Members
getNpartitions
Gets the number of partitions for ACE partitioned build.
Returns
the number of partitions
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:37
getBuildDir
Gets the directory to store ACE build artifacts.
Returns
the build directory path
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:46
isUseDisk
Gets whether disk-based storage is enabled for ACE build.
Returns
true if disk mode is enabled
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:55
getMaxHostMemoryGb
Gets the maximum host memory limit in GiB.
Returns
the max host memory limit (0 means use available memory)
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:64
getMaxGpuMemoryGb
Gets the maximum GPU memory limit in GiB.
Returns
the max GPU memory limit (0 means use available memory)
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:73
Builder
Constructs this Builder.
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:106
withNpartitions
Sets the number of partitions for ACE partitioned build.
When set to 0 (default), the number of partitions is automatically derived based on available host and GPU memory to maximize partition size while ensuring the build fits in memory.
Small values might improve recall but potentially degrade performance. The partition size is on average 2 * (n_rows / npartitions) * dim * sizeof(T). 2 is because of the core and augmented vectors. Please account for imbalance in the partition sizes (up to 3x in our tests).
If the specified number of partitions results in partitions that exceed available memory, the value will be automatically increased to fit memory constraints and a warning will be issued.
Parameters
Returns
an instance of Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:127
withBuildDir
Sets the directory to store ACE build artifacts. Used when useDisk is true or when the graph does not fit in memory.
Parameters
Returns
an instance of Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:139
withUseDisk
Sets whether to use disk-based storage for ACE build. When true, enables disk-based operations for memory-efficient graph construction.
Parameters
Returns
an instance of Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:151
withMaxHostMemoryGb
Sets the maximum host memory to use for ACE build in GiB.
When set to 0 (default), uses available host memory. Useful for testing or when running alongside other memory-intensive processes.
Parameters
Returns
an instance of Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:165
withMaxGpuMemoryGb
Sets the maximum GPU memory to use for ACE build in GiB.
When set to 0 (default), uses available GPU memory. Useful for testing or when running alongside other memory-intensive processes.
Parameters
Returns
an instance of Builder
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:179
build
Builds an instance of HnswAceParams.
Returns
an instance of HnswAceParams
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:189
Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/HnswAceParams.java:16