From 0703223d3f9c683696a326caf108af0f6406a420 Mon Sep 17 00:00:00 2001 From: Tamas Bela Feher Date: Tue, 18 Apr 2023 09:17:35 +0200 Subject: [PATCH] Fix dim param for IVF-PQ wrapper in ANN bench --- cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h b/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h index 70dff81847..517272e6cf 100644 --- a/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h +++ b/cpp/bench/ann/src/raft/raft_ivf_pq_wrapper.h @@ -42,6 +42,7 @@ template class RaftIvfPQ : public ANN { public: using typename ANN::AnnSearchParam; + using ANN::dim_; struct SearchParam : public AnnSearchParam { raft::neighbors::ivf_pq::search_params pq_param; @@ -118,7 +119,7 @@ void RaftIvfPQ::load(const std::string& file) template void RaftIvfPQ::build(const T* dataset, size_t nrow, cudaStream_t) { - auto dataset_v = raft::make_device_matrix_view(dataset, IdxT(nrow), index_->dim()); + auto dataset_v = raft::make_device_matrix_view(dataset, IdxT(nrow), dim_); index_.emplace(raft::runtime::neighbors::ivf_pq::build(handle_, index_params_, dataset_v)); return;