Skip to content

Commit fc9b51b

Browse files
authored
Disk poc bm gt num iterations (#851)
change the for
1 parent 1e8d9a6 commit fc9b51b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tests/benchmark/bm_common.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,10 @@ void BM_VecSimCommon<index_type_t>::TopK_HNSW_DISK_DeleteLabel_ProtectGT(benchma
347347
using data_t = typename index_type_t::data_t;
348348
using dist_t = typename index_type_t::dist_t;
349349

350-
351-
352350
// Build a set of all ground truth vector IDs (to protect from deletion)
353-
size_t num_iterations = st.iterations();
351+
// Note: We collect GT labels for ALL queries, not just st.iterations() which returns 0 before the loop
354352
std::unordered_set<labelType> gt_labels_set;
355-
for (size_t q = 0; q < std::min(num_iterations, N_QUERIES); q++) {
353+
for (size_t q = 0; q < N_QUERIES; q++) {
356354
auto gt_results = BM_VecSimIndex<fp32_index_t>::TopKGroundTruth(q, 100);
357355
for (const auto &res : gt_results->results) {
358356
gt_labels_set.insert(res.id);

0 commit comments

Comments
 (0)