-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable CAGRA index building without adding dataset to the index #2126
Merged
rapids-bot
merged 3 commits into
rapidsai:branch-24.04
from
tfeher:cagra_build_without_adding_dataset
Feb 2, 2024
Merged
Enable CAGRA index building without adding dataset to the index #2126
rapids-bot
merged 3 commits into
rapidsai:branch-24.04
from
tfeher:cagra_build_without_adding_dataset
Feb 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tfeher
added
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
Vector Search
and removed
cpp
labels
Jan 24, 2024
tfeher
commented
Jan 24, 2024
@@ -296,7 +296,8 @@ index<T, IdxT> build( | |||
std::optional<experimental::nn_descent::index_params> nn_descent_params = std::nullopt, | |||
std::optional<float> refine_rate = std::nullopt, | |||
std::optional<ivf_pq::index_params> pq_build_params = std::nullopt, | |||
std::optional<ivf_pq::search_params> search_params = std::nullopt) | |||
std::optional<ivf_pq::search_params> search_params = std::nullopt, | |||
bool construct_index_with_dataset = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently only cagra::detail::build
is changed. This is enough to unblock benchmarking with RAFT-ANN-Bench, but ideally we should have such an option in the public API. Opinions?
tfeher
changed the title
Enable index building without actually addin dataset to the index
Enable CAGRA index building without adding dataset to the index
Jan 24, 2024
tfeher
force-pushed
the
cagra_build_without_adding_dataset
branch
from
February 1, 2024 16:45
4fc8723
to
707547a
Compare
cjnolet
approved these changes
Feb 1, 2024
cjnolet
approved these changes
Feb 1, 2024
/merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cpp
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
Vector Search
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We can build a CAGRA graph even for datasets that do not fit GPU mem. The IVF-PQ build method only requires that the temporary IVF-PQ index (that we use for creating the knn-graph) fits the GPU. But once the CAGRA graph is constructed, we try to initialize the CAGRA index which would copy the dataset to device memory.
This PR adds a build flag, that would disable copying the dataset into the index. That enables building CAGRA graph for large datasets, and also allows users to customize allocator used for storing the data.