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

Allow topk larger than 1024 in CAGRA #2181

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

benfred
Copy link
Member

@benfred benfred commented Feb 13, 2024

Reapply changes from #2097

This change allows CAGRA search to have an arbitrarily large top-k, instead of being limited to 1024 like in the previous code.

This works by using the multi-kernel search path, and replacing the _cuann_find_topk code with the matrix::select_k code - which can handle large K values.

Reapply changes from rapidsai#2097

This change allows CAGRA search to have an arbitrarily large top-k, instead of being limited to 1024 like in the previous code.

This works by using the multi-kernel search path, and replacing the _cuann_find_topk code with the matrix::select_k code - which can handle large K values.
Commit fea490a attempted to fix a problem where the search_params.itopk_size wasn't being set in the CAGRA filter
tests.

This change was required to enable testing k>1024, since the default itopk_size was too small.
However, this broke the unittest for k < 1024 - and was causing illegal memory access errors.

Fix by reverting the filter tests to the previous behaviour, and disabling the filter tests for
k>1024
@benfred benfred requested a review from a team as a code owner February 13, 2024 19:49
@github-actions github-actions bot added the cpp label Feb 13, 2024
@benfred benfred mentioned this pull request Feb 13, 2024
@benfred benfred added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 13, 2024
@cjnolet
Copy link
Member

cjnolet commented Feb 14, 2024

/merge

@rapids-bot rapids-bot bot merged commit addb485 into rapidsai:branch-24.04 Feb 14, 2024
61 checks passed
@benfred benfred deleted the reapply_cagra_large_topk branch February 29, 2024 21:39
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants