Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cpp/tests/neighbors/ann_ivf_pq.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,11 @@ class ivf_pq_test : public ::testing::TestWithParam<ivf_pq_inputs> {
// the original data cannot be reconstructed since the dataset was normalized
if (index.metric() == cuvs::distance::DistanceType::CosineExpanded) { return; }
auto& rec_list = index.lists()[label];
auto dim = index.dim();
n_take = std::min<uint32_t>(n_take, rec_list->size.load());
n_skip = std::min<uint32_t>(n_skip, rec_list->size.load() - n_take);
// If the data is unbalanced the list might be empty, which is actually nullptr
if (!rec_list) { return; }
auto dim = index.dim();
n_take = std::min<uint32_t>(n_take, rec_list->size.load());
n_skip = std::min<uint32_t>(n_skip, rec_list->size.load() - n_take);

if (n_take == 0) { return; }

Expand Down