Skip to content

Commit

Permalink
Fix merge mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
anaruse committed Jan 30, 2025
1 parent 23852af commit 7e7ff1e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpp/include/cuvs/neighbors/cagra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ struct search_params : cuvs::neighbors::search_params {
/**
* A parameter indicating the rate of nodes to be filtered-out, when filtering is used.
* The value must be equal to or greater than 0.0 and less than 1.0. Default value is
* negative, in which case the filtering rate is automatically set.
* negative, in which case the filtering rate is automatically calculated.
*/
float filtering_rate = -1.0;
};
Expand Down
6 changes: 4 additions & 2 deletions cpp/src/neighbors/detail/cagra/search_multi_cta.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,14 @@ struct search : public search_plan_impl<DataT, IndexT, DistanceT, SAMPLE_FILTER_

void set_params(raft::resources const& res, const search_params& params)
{
const size_t global_itopk_size = itopk_size;
size_t global_itopk_size = itopk_size;
constexpr unsigned multi_cta_itopk_size = 32;
this->itopk_size = multi_cta_itopk_size;
search_width = 1;
RAFT_LOG_DEBUG("params.itopk_size: %lu", (uint64_t)params.itopk_size);
RAFT_LOG_DEBUG("global_itopk_size: %lu", (uint64_t)global_itopk_size);
num_cta_per_query =
max(params.search_width, raft::ceildiv(params.itopk_size, (size_t)multi_cta_itopk_size));
max(params.search_width, raft::ceildiv(global_itopk_size, (size_t)multi_cta_itopk_size));
result_buffer_size = itopk_size + (search_width * graph_degree);
typedef raft::Pow2<32> AlignBytes;
unsigned result_buffer_size_32 = AlignBytes::roundUp(result_buffer_size);
Expand Down

0 comments on commit 7e7ff1e

Please sign in to comment.