Skip to content

Commit 9bb888f

Browse files
authored
Merge pull request #939 from rapidsai/branch-25.06
Forward-merge branch-25.06 into branch-25.08
2 parents 9631f8b + 079e030 commit 9bb888f

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cpp/tests/neighbors/ann_ivf_pq.cuh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ class ivf_pq_test : public ::testing::TestWithParam<ivf_pq_inputs> {
316316
// NB: this is not reference, the list is retained; the index will have to create a new list on
317317
// `erase_list` op.
318318
auto old_list = index->lists()[label];
319-
auto n_rows = old_list->size.load();
319+
// If the data is unbalanced the list might be empty, which is actually nullptr
320+
if (!old_list) { return; }
321+
auto n_rows = old_list->size.load();
320322
if (n_rows == 0) { return; }
321323
if (index->metric() == cuvs::distance::DistanceType::CosineExpanded) { return; }
322324

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

355359
if (n_rows == 0) { return; }
356360

0 commit comments

Comments
 (0)