Skip to content

Commit

Permalink
Remove use_vpq flag
Browse files Browse the repository at this point in the history
  • Loading branch information
enp1s0 committed Mar 13, 2024
1 parent ccc7c23 commit 561ecff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cpp/include/raft/neighbors/detail/cagra/cagra_search.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ void search_main(raft::resources const& res,
auto graph_internal = raft::make_device_matrix_view<const InternalIdxT, int64_t, row_major>(
reinterpret_cast<const InternalIdxT*>(graph.data_handle()), graph.extent(0), graph.extent(1));

bool use_vpq = false;

// n_rows has the same type as the dataset index (the array extents type)
using ds_idx_type = decltype(index.dataset().n_rows());
// Dispatch search parameters based on the dataset kind.
Expand All @@ -269,7 +267,7 @@ void search_main(raft::resources const& res,
// determined here. They are set just before kernel launch.
using dataset_desc_t = standard_dataset_descriptor_t<T, InternalIdxT, 0, 0, DistanceT>;
// Search using a plain (strided) row-major dataset
const dataset_desc_t dataset_desc(strided_dset->view().data_handle(),
const dataset_desc_t dataset_desc(strided_dset->view().data_handle(),
strided_dset->n_rows(),
strided_dset->dim(),
strided_dset->stride());
Expand All @@ -279,12 +277,10 @@ const dataset_desc_t dataset_desc(strided_dset->view().data_handle(),
} else if (auto* vpq_dset =
dynamic_cast<const vpq_dataset<float, ds_idx_type>*>(&index.dataset());
vpq_dset != nullptr) {
use_vpq = true;
// Search using a compressed dataset
RAFT_FAIL("FP32 VPQ dataset support is coming soon");
} else if (auto* vpq_dset = dynamic_cast<const vpq_dataset<half, ds_idx_type>*>(&index.dataset());
vpq_dset != nullptr) {
use_vpq = true;
lauch_vpq_search_main_core<T, half, ds_idx_type, InternalIdxT, DistanceT, CagraSampleFilterT>(
res, vpq_dset, params, graph_internal, queries, neighbors, distances, sample_filter);
} else if (auto* empty_dset = dynamic_cast<const empty_dataset<ds_idx_type>*>(&index.dataset());
Expand Down

0 comments on commit 561ecff

Please sign in to comment.