Context
Upstream rapidsai/cuvs#1906 requests binary dataset support in CAGRA — specifically, the ability to accept binary-quantized vectors with residual codes for ADC (asymmetric distance computation). This is a requirement from OpenSearch.
Upstream Dependency
This feature is blocked upstream on rapidsai/cuvs#1846 — a WIP PR that introduces a new padded_dataset API replacing strided_dataset, with support plumbed into CAGRA. Key design decisions in NVIDIA#1846:
- Users should not need to know about dataset padding internals —
padded_dataset handles it
- Graph-based APIs (CAGRA, Vamana) should accept pre-quantized data (e.g., PQ with codebooks) rather than performing their own quantization — decouples quantization from the algorithm
- Memory ownership stays with the user, not the algorithm
Status (as of 2026-03-23): PR NVIDIA#1846 is still open and marked WIP. Last activity: March 4, 2026.
Decision Needed
Two options:
Option B: From-scratch implementation
Option C: Hybrid — minimal dataset abstraction now, align later
Scope (for any option)
References
Context
Upstream rapidsai/cuvs#1906 requests binary dataset support in CAGRA — specifically, the ability to accept binary-quantized vectors with residual codes for ADC (asymmetric distance computation). This is a requirement from OpenSearch.
Upstream Dependency
This feature is blocked upstream on rapidsai/cuvs#1846 — a WIP PR that introduces a new
padded_datasetAPI replacingstrided_dataset, with support plumbed into CAGRA. Key design decisions in NVIDIA#1846:padded_datasethandles itStatus (as of 2026-03-23): PR NVIDIA#1846 is still open and marked WIP. Last activity: March 4, 2026.
Decision Needed
Two options:
Option A: Cherry-pick NVIDIA#1846 + implement NVIDIA#1906
strided_dataset→padded_dataset), large surface area, still WIPOption B: From-scratch implementation
binary_datasetclass that wraps packed bit vectors and provides Hamming distanceif constexprdispatch (same pattern used for double/bf16 in PR feat: add float64 and bfloat16 support to CAGRA #4)Option C: Hybrid — minimal dataset abstraction now, align later
binary_datasetthat's compatible with the direction of [REVIEW] New Dataset API Clarifying Ownership NVIDIA/cuvs#1846 but doesn't require the fullpadded_datasetrefactorScope (for any option)
uint8_tstorage withNvectors ofDbits →[N × ceil(D/8)]uint8 matrix)References
Datasetdirectly NVIDIA/cuvs#1571 (dataset ownership/padding)