[FEA] IVF-PQ Build Factories for Precomputed Centroids and Codebooks#1483
[FEA] IVF-PQ Build Factories for Precomputed Centroids and Codebooks#1483rapids-bot[bot] merged 256 commits intorapidsai:mainfrom
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
…into build-from-args
…into build-from-args
…into build-from-args
|
/ok to test 2aae6c1 |
|
/ok to test 9d2dc10 |
|
/ok to test 94a88d9 |
|
@lowener the current approach is causing test failures. By default, when doing something like index.pq_centers(), the non-const getters get called, and we throw errors there in the |
lowener
left a comment
There was a problem hiding this comment.
LGTM, having the non-const getter not accessible in the virtual interface should make it less prone to errors for end-users.
|
/ok to test 5921585 |
|
/ok to test e9aaca3 |
|
/ok to test fc3e4eb |
|
/ok to test b95c5ff |
|
/merge |
…roids (#1664) To be merged after #1483 Authors: - Tarang Jain (https://github.com/tarang-jain) Approvers: - Ben Frederickson (https://github.com/benfred) URL: #1664
IVF-PQ Index Build API Enhancements and PIMPL Refactoring
Summary
This PR adds new build APIs for IVF-PQ indices using precomputed centroids and implements a complete PIMPL refactoring with owning/view semantics
Key Changes
Added
cuvs::neighbors::ivf_pq::build()overloads that accept precomputed cluster centroids, PQ codebooks, and rotation matricesEnables building indices from pre-trained models without re-training
Supports both device and host input data with automatic memory transfer
owning_impl: Owns centroid and codebook data (traditional behavior)view_impl: References external centroid data without copyingMaintains identical search behavior with zero data copying
Removed mutator functions that directly modify the state of the index. Instead we have helpers for the user to fetch and own the transformed data
View indices avoid copying large centroid arrays
Backward Compatibility: All existing APIs work unchanged
[Updates] (as of 12/23/2025):
The non-const getters that allow direct modification of the state of the index:
pq_centers(),centers(),centers_rot()androtation_matrix()have been removed from the interface and the user-facing class.