Skip to content

Brute force knn tile size heuristic#316

Merged
rapids-bot[bot] merged 7 commits intorapidsai:branch-24.10from
mfoerste4:tiled_bf_knn
Sep 11, 2024
Merged

Brute force knn tile size heuristic#316
rapids-bot[bot] merged 7 commits intorapidsai:branch-24.10from
mfoerste4:tiled_bf_knn

Conversation

@mfoerste4
Copy link
Copy Markdown
Contributor

This PR modifies the tile size heuristic for brute force knn as mentioned in (#277).

It also removes some unneeded cuda calls to save a couple of microseconds which might be relevant when running smaller batches.

CC @tfeher

@mfoerste4 mfoerste4 requested a review from a team as a code owner September 6, 2024 09:51
@github-actions github-actions Bot added the cpp label Sep 6, 2024
Copy link
Copy Markdown
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks Malte for the PR! Could you address the two smaller issues below?

Comment thread cpp/src/neighbors/detail/knn_brute_force.cuh Outdated
Comment thread cpp/src/neighbors/detail/knn_brute_force.cuh Outdated
@cjnolet cjnolet added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Sep 6, 2024
Copy link
Copy Markdown
Contributor

@benfred benfred 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 fixing this @mfoerste4 !

Comment thread cpp/src/neighbors/detail/knn_brute_force.cuh Outdated

std::vector<IdxType>* id_ranges;
if (translations == nullptr) {
std::vector<IdxType> id_ranges;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

longer term - we can probably remove the code that handles translations entirely. Its not being used in the public api anymore, and is just left over from the RAFT version. (doesn't need to change in this PR though)

@mfoerste4 mfoerste4 requested review from benfred and tfeher September 9, 2024 20:51
@mfoerste4
Copy link
Copy Markdown
Contributor Author

@tfeher @benfred , thanks for the review. I have addressed your suggestions.

Copy link
Copy Markdown
Contributor

@benfred benfred left a comment

Choose a reason for hiding this comment

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

lgtm - thanks @mfoerste4 !

Copy link
Copy Markdown
Contributor

@tfeher tfeher left a comment

Choose a reason for hiding this comment

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

Thanks Malte for the updates, LGTM!

@tfeher
Copy link
Copy Markdown
Contributor

tfeher commented Sep 11, 2024

/merge

@rapids-bot rapids-bot Bot merged commit 68480c9 into rapidsai:branch-24.10 Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cpp improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants