Skip to content

Commit

Permalink
Fixing remaining bug in ann_quantized (rapidsai#1327)
Browse files Browse the repository at this point in the history
Authors:
  - Corey J. Nolet (https://github.com/cjnolet)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#1327
  • Loading branch information
cjnolet authored and lowener committed Mar 15, 2023
1 parent 65dad37 commit 0effd96
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cpp/include/raft/spatial/knn/detail/ann_quantized.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void approx_knn_build_index(raft::device_resources const& handle,
params.pq_dim = ivf_pq_pams->M;
// TODO: handle ivf_pq_pams.usePrecomputedTables ?

auto index_view = raft::make_device_matrix_view<const T, IntType>(index_array, n, D);
auto index_view = raft::make_device_matrix_view<const T, int64_t>(index_array, n, D);
index->ivf_pq = std::make_unique<const neighbors::ivf_pq::index<int64_t>>(
neighbors::ivf_pq::build(handle, params, index_view));
} else {
Expand Down Expand Up @@ -116,9 +116,9 @@ void approx_knn_search(raft::device_resources const& handle,
params.n_probes = index->nprobe;

auto query_view =
raft::make_device_matrix_view<const T, IntType>(query_array, n, index->ivf_pq->dim());
auto indices_view = raft::make_device_matrix_view<IntType, IntType>(indices, n, k);
auto distances_view = raft::make_device_matrix_view<float, IntType>(distances, n, k);
raft::make_device_matrix_view<const T, int64_t>(query_array, n, index->ivf_pq->dim());
auto indices_view = raft::make_device_matrix_view<int64_t, int64_t>(indices, n, k);
auto distances_view = raft::make_device_matrix_view<float, int64_t>(distances, n, k);
neighbors::ivf_pq::search(
handle, params, *index->ivf_pq, query_view, k, indices_view, distances_view);
} else {
Expand Down

0 comments on commit 0effd96

Please sign in to comment.