CAGRA binary Hamming distance support#610
Merged
rapids-bot[bot] merged 52 commits intorapidsai:branch-25.02from Feb 4, 2025
Merged
CAGRA binary Hamming distance support#610rapids-bot[bot] merged 52 commits intorapidsai:branch-25.02from
rapids-bot[bot] merged 52 commits intorapidsai:branch-25.02from
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. |
Member
|
/ok to test |
…into iteratively_build_graph_index
…nce-iterative-build
…nce-iterative-build
….enp1s0.dev:11022/nv/cuvs into cagra-hamming-distance-iterative-build
…cagra-hamming-distance
Member
|
/ok to test |
Member
Author
|
@cjnolet In this PR, I include void transform(raft::resources const& res,
raft::device_matrix_view<const double, int64_t> dataset,
raft::device_matrix_view<uint8_t, int64_t> out);and, for example, is it better to define a param structure and change the function arguments as follows? enum class binary_quantization_algo_t {set_bit_if_positive};
struct cuvs::cuvs::preprocessing::quantize::binary::params{
binary_quantization_algo_t algo = binary_quantize_algo_t::set_if_positive;
};
void transform(raft::resources const& res,
cuvs::cuvs::preprocessing::quantize::binary::params& params,
raft::device_matrix_view<const double, int64_t> dataset,
raft::device_matrix_view<uint8_t, int64_t> out); |
This PR is about how CAGRA's search() and optimize() can be used to iteratively create and improve graph index. Currently, IVFPQ and NND are used to create the initial kNN graph, which is then optimized to create the CAGRA search graph. So, for example, if you want to support a new data type in CAGRA, you need to create an initial kNN graph with that data type, and IVFPQ or NND must also support that new data type. This is a bit of hassle. This PR is one solution to that problem. With functionality of this PR, once the CAGRA search supports the new data type, it can be used to create a graph index with it. Authors: - Akira Naruse (https://github.com/anaruse) - Corey J. Nolet (https://github.com/cjnolet) Approvers: - Artem M. Chirkin (https://github.com/achirkin) - Tamas Bela Feher (https://github.com/tfeher) URL: rapidsai#612
Member
|
/ok to test |
tfeher
requested changes
Feb 3, 2025
Co-authored-by: Tamas Bela Feher <tfeher@nvidia.com>
Member
Author
|
@tfeher Thank you for reviewing the code. I fixed it. Can you review it again? |
Member
|
/ok to test |
cjnolet
approved these changes
Feb 4, 2025
Member
|
/merge |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds the binary Hamming distance support to CAGRA.
dependency: #612
TODO:
DistanceType::BinaryHamming(becauseHammingUnexpandedis not bitwise operation)preprocessing::quantize::binary