-
Notifications
You must be signed in to change notification settings - Fork 143
CAGRA binary Hamming distance support #610
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
CAGRA binary Hamming distance support #610
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. |
|
/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
|
/ok to test |
|
@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
|
/ok to test |
tfeher
left a comment
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.
Thanks @enp1s0 for the PR, it looks great, I just have a few smaller comments.
|
@tfeher Thank you for reviewing the code. I fixed it. Can you review it again? |
tfeher
left a comment
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.
Thanks @enp1s0 for the updates, the PR looks good to me!
|
/ok to test |
|
/merge |
This PR adds the binary Hamming distance support to CAGRA.
dependency: #612
TODO:
DistanceType::BinaryHamming(becauseHammingUnexpandedis not bitwise operation)preprocessing::quantize::binary