Skip to content

Commit

Permalink
Allow setting team_size explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
achirkin committed Aug 28, 2024
1 parent 1c23549 commit f9ee7c7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cpp/src/neighbors/detail/cagra/search_plan.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ struct search_plan_impl_base : public search_params {

void set_dataset_block_and_team_size(int64_t dim)
{
switch (team_size) {
case 8: dataset_block_dim = 128; return;
case 16: dataset_block_dim = 256; return;
case 32: dataset_block_dim = 512; return;
default: break;
}
constexpr int64_t max_dataset_block_dim = 512;
dataset_block_dim = 128;
while (dataset_block_dim < dim && dataset_block_dim < max_dataset_block_dim) {
Expand Down

0 comments on commit f9ee7c7

Please sign in to comment.