#[repr(C)]pub struct cuvsAceParams {
pub npartitions: usize,
pub ef_construction: usize,
pub build_dir: *const c_char,
pub use_disk: bool,
pub max_host_memory_gb: f64,
pub max_gpu_memory_gb: f64,
}Expand description
Parameters for ACE (Augmented Core Extraction) graph build. ACE enables building indexes for datasets too large to fit in GPU memory by:
- Partitioning the dataset in core (closest) and augmented (second-closest) partitions using balanced k-means.
- Building sub-indexes for each partition independently
- Concatenating sub-graphs into a final unified index
Fields§
§npartitions: usizeNumber of partitions for ACE (Augmented Core Extraction) 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 and increase memory usage. Partitions should not be too small to prevent issues in KNN graph construction. 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.
ef_construction: usizeThe index quality for the ACE build.
Bigger values increase the index quality. At some point, increasing this will no longer improve the quality.
build_dir: *const c_charDirectory to store ACE build artifacts (e.g., KNN graph, optimized graph).
Used when use_disk is true or when the graph does not fit in host and GPU
memory. This should be the fastest disk in the system and hold enough space
for twice the dataset, final graph, and label mapping.
use_disk: boolWhether to use disk-based storage for ACE build.
When true, enables disk-based operations for memory-efficient graph construction.
max_host_memory_gb: f64Maximum host memory to use for ACE build in GiB.
When set to 0 (default), uses available host memory. When set to a positive value, limits host memory usage to the specified amount. Useful for testing or when running alongside other memory-intensive processes.
max_gpu_memory_gb: f64Maximum GPU memory to use for ACE build in GiB.
When set to 0 (default), uses available GPU memory. When set to a positive value, limits GPU memory usage to the specified amount. Useful for testing or when running alongside other memory-intensive processes.
Trait Implementations§
Source§impl Clone for cuvsAceParams
impl Clone for cuvsAceParams
Source§fn clone(&self) -> cuvsAceParams
fn clone(&self) -> cuvsAceParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more