Skip to content

Commit

Permalink
Fix VPQ search params validation
Browse files Browse the repository at this point in the history
  • Loading branch information
enp1s0 committed Mar 20, 2024
1 parent 103b9c0 commit 1fb7c36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/include/raft/neighbors/detail/cagra/cagra_search.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ void launch_vpq_search_main_core(
raft::device_matrix_view<DistanceT, int64_t, row_major> distances,
CagraSampleFilterT sample_filter)
{
assert(vpq_dset->pq_bits() == 2 || vpq_dset->pq_bits() == 4);
assert(vpq_dset->dim() % vpq_dset->pq_dim() == 0);

This comment has been minimized.

Copy link
@achirkin

achirkin Mar 20, 2024

Contributor

I think it makes sense to replace this with RAFT_EXPECTS: assert only works in debug mode, but this error is supposed to be seen by the user, who'd usually get raft in the release mode.


const float vq_scale = 1.0f;
const float pq_scale = 1.0f;

Expand Down

0 comments on commit 1fb7c36

Please sign in to comment.