@@ -102,14 +102,14 @@ class Benchmark_float_qps : public Benchmark_knowhere, public ::testing::Test {
102
102
103
103
template <typename T>
104
104
void
105
- test_raft_cagra (const knowhere::Json& cfg) {
105
+ test_cuvs_cagra (const knowhere::Json& cfg) {
106
106
auto conf = cfg;
107
107
std::string data_type_str = get_data_type_name<T>();
108
108
109
- auto find_smallest_itopk_size = [&](float expected_recall) -> std::tuple<int32_t , float > {
109
+ auto find_smallest_itopk_size = [&](float expected_recall, int topk ) -> std::tuple<int32_t , float > {
110
110
std::unordered_map<int32_t , float > recall_map;
111
111
auto ds_ptr = knowhere::GenDataSet (nq_, dim_, xq_);
112
- auto left = 32 ;
112
+ auto left = topk ;
113
113
auto right = 256 ;
114
114
auto itopk_size = left;
115
115
@@ -137,7 +137,7 @@ class Benchmark_float_qps : public Benchmark_knowhere, public ::testing::Test {
137
137
};
138
138
139
139
for (auto expected_recall : EXPECTED_RECALLs_) {
140
- auto [itopk_size, recall] = find_smallest_itopk_size (expected_recall);
140
+ auto [itopk_size, recall] = find_smallest_itopk_size (expected_recall, topk_ );
141
141
conf[knowhere::indexparam::ITOPK_SIZE] = ((int {topk_} + 32 - 1 ) / 32 ) * 32 ;
142
142
conf[knowhere::meta::TOPK] = topk_;
143
143
conf[knowhere::indexparam::ITOPK_SIZE] = itopk_size;
@@ -375,7 +375,7 @@ class Benchmark_float_qps : public Benchmark_knowhere, public ::testing::Test {
375
375
knowhere::KnowhereConfig::InitGPUResource (GPU_DEVICE_ID, 2 );
376
376
cfg_[knowhere::meta::DEVICE_ID] = GPU_DEVICE_ID;
377
377
#endif
378
- #ifdef KNOWHERE_WITH_RAFT
378
+ #ifdef KNOWHERE_WITH_CUVS
379
379
knowhere::KnowhereConfig::SetRaftMemPool ();
380
380
#endif
381
381
}
@@ -558,9 +558,9 @@ TEST_F(Benchmark_float_qps, TEST_DISKANN) {
558
558
}
559
559
#endif
560
560
561
- #ifdef KNOWHERE_WITH_RAFT
562
- TEST_F (Benchmark_float_qps, TEST_RAFT_BRUTE_FORCE ) {
563
- index_type_ = knowhere::IndexEnum::INDEX_RAFT_BRUTEFORCE ;
561
+ #ifdef KNOWHERE_WITH_CUVS
562
+ TEST_F (Benchmark_float_qps, TEST_CUVS_BRUTE_FORCE ) {
563
+ index_type_ = knowhere::IndexEnum::INDEX_CUVS_BRUTEFORCE ;
564
564
565
565
std::string index_file_name;
566
566
knowhere::Json conf = cfg_;
@@ -569,8 +569,8 @@ TEST_F(Benchmark_float_qps, TEST_RAFT_BRUTE_FORCE) {
569
569
TEST_INDEX (idmap, knowhere::fp32, params);
570
570
}
571
571
572
- TEST_F (Benchmark_float_qps, TEST_RAFT_IVF_FLAT ) {
573
- index_type_ = knowhere::IndexEnum::INDEX_RAFT_IVFFLAT ;
572
+ TEST_F (Benchmark_float_qps, TEST_CUVS_IVF_FLAT ) {
573
+ index_type_ = knowhere::IndexEnum::INDEX_CUVS_IVFFLAT ;
574
574
575
575
std::string index_file_name;
576
576
knowhere::Json conf = cfg_;
@@ -582,8 +582,8 @@ TEST_F(Benchmark_float_qps, TEST_RAFT_IVF_FLAT) {
582
582
}
583
583
}
584
584
585
- TEST_F (Benchmark_float_qps, TEST_RAFT_IVF_PQ ) {
586
- index_type_ = knowhere::IndexEnum::INDEX_RAFT_IVFPQ ;
585
+ TEST_F (Benchmark_float_qps, TEST_CUVS_IVF_PQ ) {
586
+ index_type_ = knowhere::IndexEnum::INDEX_CUVS_IVFPQ ;
587
587
588
588
std::string index_file_name;
589
589
knowhere::Json conf = cfg_;
@@ -599,8 +599,8 @@ TEST_F(Benchmark_float_qps, TEST_RAFT_IVF_PQ) {
599
599
}
600
600
}
601
601
602
- TEST_F (Benchmark_float_qps, TEST_RAFT_CAGRA ) {
603
- index_type_ = knowhere::IndexEnum::INDEX_RAFT_CAGRA ;
602
+ TEST_F (Benchmark_float_qps, TEST_CUVS_CAGRA ) {
603
+ index_type_ = knowhere::IndexEnum::INDEX_CUVS_CAGRA ;
604
604
605
605
std::string index_file_name;
606
606
knowhere::Json conf = cfg_;
@@ -609,7 +609,7 @@ TEST_F(Benchmark_float_qps, TEST_RAFT_CAGRA) {
609
609
conf[knowhere::indexparam::GRAPH_DEGREE] = graph_degree;
610
610
conf[knowhere::indexparam::INTERMEDIATE_GRAPH_DEGREE] = graph_degree;
611
611
std::vector<int32_t > params = {graph_degree};
612
- TEST_INDEX (raft_cagra , knowhere::fp32, params);
612
+ TEST_INDEX (cuvs_cagra , knowhere::fp32, params);
613
613
}
614
614
}
615
615
#endif
0 commit comments