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: 6 additions & 2 deletions cpp/tests/neighbors/ann_ivf_pq.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ class ivf_pq_test : public ::testing::TestWithParam<ivf_pq_inputs> {
// NB: this is not reference, the list is retained; the index will have to create a new list on
// `erase_list` op.
auto old_list = index->lists()[label];
auto n_rows = old_list->size.load();
// If the data is unbalanced the list might be empty, which is actually nullptr
if (!old_list) { return; }
auto n_rows = old_list->size.load();
if (n_rows == 0) { return; }
if (index->metric() == cuvs::distance::DistanceType::CosineExpanded) { return; }

Expand Down Expand Up @@ -350,7 +352,9 @@ class ivf_pq_test : public ::testing::TestWithParam<ivf_pq_inputs> {
void check_packing(index<IdxT>* index, uint32_t label)
{
auto old_list = index->lists()[label];
auto n_rows = old_list->size.load();
// If the data is unbalanced the list might be empty, which is actually nullptr
if (!old_list) { return; }
auto n_rows = old_list->size.load();

if (n_rows == 0) { return; }

Expand Down
Loading