Skip to content
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

Inner Product for CAGRA-Q #458

Draft
wants to merge 8 commits into
base: branch-24.12
Choose a base branch
from

Conversation

tarang-jain
Copy link
Contributor

Partially addresses #198 (Cosine still pending for CAGRA and CAGRA-Q).

@github-actions github-actions bot added the cpp label Nov 10, 2024
@tarang-jain tarang-jain added feature request New feature or request non-breaking Introduces a non-breaking change labels Nov 11, 2024
@tarang-jain tarang-jain self-assigned this Nov 11, 2024
@github-actions github-actions bot added the CMake label Nov 12, 2024
Copy link
Contributor

@achirkin achirkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. It's nice to see only minimal changes are needed to add a new metric.
There are (as expected) many new files though. Could you please check the binary size doesn't blow up?

{false},
{true},
{0.6}); // don't demand high recall without refinement
{0.55}); // don't demand high recall without refinement
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please justify, why reducing the recall here? Why is it not a bug in build or search functions?

Comment on lines +296 to +297
half2 dist = dist_op<half2, DescriptorT::kMetric>(
q2, c2 + reinterpret_cast<half2(&)[PQ_LEN * vlen / 2]>(vq_vals)[d1]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please benchmark this before/after the change at least for: single_cta/multi_cta, itopk in range of 32...512, with couple PQ configs. I'm concerned specifically about a possibility of increased register usage and spilling, which could manifest in a significant drop in QPS in some cases.

cpp/src/neighbors/detail/vpq_dataset.cuh Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake cpp feature request New feature or request non-breaking Introduces a non-breaking change Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants