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;