Loading core/src/scheduler/optimizer/Pass.h +3 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ namespace scheduler { class Pass { public: virtual void Init() { } // virtual void // Init() { // } virtual bool Run(const TaskPtr& task) = 0; Loading core/unittest/wrapper/test_wrapper.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -164,3 +164,14 @@ TEST_P(KnowhereWrapperTest, SERIALIZE_TEST) { AssertResult(res_ids, res_dis); } } #include "wrapper/ConfAdapter.h" TEST(whatever, test_config) { milvus::engine::TempMetaConf conf; auto nsg_conf = std::make_shared<milvus::engine::NSGConfAdapter>(); nsg_conf->Match(conf); nsg_conf->MatchSearch(conf, milvus::engine::IndexType::FAISS_IVFPQ_GPU); auto pq_conf = std::make_shared<milvus::engine::IVFPQConfAdapter>(); pq_conf->Match(conf); } core/unittest/wrapper/utils.h +22 −22 Original line number Diff line number Diff line Loading @@ -104,28 +104,28 @@ class ParamGenerator { tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case milvus::engine::IndexType::FAISS_IVFPQ_CPU: case milvus::engine::IndexType::FAISS_IVFPQ_GPU: { auto tempconf = std::make_shared<knowhere::IVFPQCfg>(); tempconf->nlist = 100; tempconf->nprobe = 16; tempconf->nbits = 8; tempconf->m = 8; tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case milvus::engine::IndexType::NSG_MIX: { auto tempconf = std::make_shared<knowhere::NSGCfg>(); tempconf->nlist = 100; tempconf->nprobe = 16; tempconf->search_length = 8; tempconf->knng = 200; tempconf->search_length = 40; // TODO(linxj): be 20 when search tempconf->out_degree = 60; tempconf->candidate_pool_size = 200; tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } // case milvus::engine::IndexType::FAISS_IVFPQ_CPU: // case milvus::engine::IndexType::FAISS_IVFPQ_GPU: { // auto tempconf = std::make_shared<knowhere::IVFPQCfg>(); // tempconf->nlist = 100; // tempconf->nprobe = 16; // tempconf->nbits = 8; // tempconf->m = 8; // tempconf->metric_type = knowhere::METRICTYPE::L2; // return tempconf; // } // case milvus::engine::IndexType::NSG_MIX: { // auto tempconf = std::make_shared<knowhere::NSGCfg>(); // tempconf->nlist = 100; // tempconf->nprobe = 16; // tempconf->search_length = 8; // tempconf->knng = 200; // tempconf->search_length = 40; // TODO(linxj): be 20 when search // tempconf->out_degree = 60; // tempconf->candidate_pool_size = 200; // tempconf->metric_type = knowhere::METRICTYPE::L2; // return tempconf; // } } } }; Loading Loading
core/src/scheduler/optimizer/Pass.h +3 −3 Original line number Diff line number Diff line Loading @@ -34,9 +34,9 @@ namespace scheduler { class Pass { public: virtual void Init() { } // virtual void // Init() { // } virtual bool Run(const TaskPtr& task) = 0; Loading
core/unittest/wrapper/test_wrapper.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -164,3 +164,14 @@ TEST_P(KnowhereWrapperTest, SERIALIZE_TEST) { AssertResult(res_ids, res_dis); } } #include "wrapper/ConfAdapter.h" TEST(whatever, test_config) { milvus::engine::TempMetaConf conf; auto nsg_conf = std::make_shared<milvus::engine::NSGConfAdapter>(); nsg_conf->Match(conf); nsg_conf->MatchSearch(conf, milvus::engine::IndexType::FAISS_IVFPQ_GPU); auto pq_conf = std::make_shared<milvus::engine::IVFPQConfAdapter>(); pq_conf->Match(conf); }
core/unittest/wrapper/utils.h +22 −22 Original line number Diff line number Diff line Loading @@ -104,28 +104,28 @@ class ParamGenerator { tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case milvus::engine::IndexType::FAISS_IVFPQ_CPU: case milvus::engine::IndexType::FAISS_IVFPQ_GPU: { auto tempconf = std::make_shared<knowhere::IVFPQCfg>(); tempconf->nlist = 100; tempconf->nprobe = 16; tempconf->nbits = 8; tempconf->m = 8; tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } case milvus::engine::IndexType::NSG_MIX: { auto tempconf = std::make_shared<knowhere::NSGCfg>(); tempconf->nlist = 100; tempconf->nprobe = 16; tempconf->search_length = 8; tempconf->knng = 200; tempconf->search_length = 40; // TODO(linxj): be 20 when search tempconf->out_degree = 60; tempconf->candidate_pool_size = 200; tempconf->metric_type = knowhere::METRICTYPE::L2; return tempconf; } // case milvus::engine::IndexType::FAISS_IVFPQ_CPU: // case milvus::engine::IndexType::FAISS_IVFPQ_GPU: { // auto tempconf = std::make_shared<knowhere::IVFPQCfg>(); // tempconf->nlist = 100; // tempconf->nprobe = 16; // tempconf->nbits = 8; // tempconf->m = 8; // tempconf->metric_type = knowhere::METRICTYPE::L2; // return tempconf; // } // case milvus::engine::IndexType::NSG_MIX: { // auto tempconf = std::make_shared<knowhere::NSGCfg>(); // tempconf->nlist = 100; // tempconf->nprobe = 16; // tempconf->search_length = 8; // tempconf->knng = 200; // tempconf->search_length = 40; // TODO(linxj): be 20 when search // tempconf->out_degree = 60; // tempconf->candidate_pool_size = 200; // tempconf->metric_type = knowhere::METRICTYPE::L2; // return tempconf; // } } } }; Loading