mirror of https://github.com/milvus-io/milvus.git
Merge branch 'add_unittest' into 'branch-0.4.0'
MS-526 1. Fix knowhere unittest again See merge request megasearch/milvus!519 Former-commit-id: a8daadff8b8389bf7a68d3e19424117dc354c7cepull/191/head
commit
724be3dae0
|
@ -52,7 +52,7 @@ class IVFTest
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
std::tie(index_type, preprocess_cfg, train_cfg, add_cfg, search_cfg) = GetParam();
|
std::tie(index_type, preprocess_cfg, train_cfg, add_cfg, search_cfg) = GetParam();
|
||||||
//Init_with_default();
|
//Init_with_default();
|
||||||
Generate(128, 1000000/10, 10);
|
Generate(128, 1000000/100, 10);
|
||||||
index_ = IndexFactory(index_type);
|
index_ = IndexFactory(index_type);
|
||||||
FaissGpuResourceMgr::GetInstance().InitDevice(device_id, 1024*1024*200, 1024*1024*600, 2);
|
FaissGpuResourceMgr::GetInstance().InitDevice(device_id, 1024*1024*200, 1024*1024*600, 2);
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ INSTANTIATE_TEST_CASE_P(IVFParameters, IVFTest,
|
||||||
Config::object{{"k", 10}}),
|
Config::object{{"k", 10}}),
|
||||||
std::make_tuple("GPUIVF",
|
std::make_tuple("GPUIVF",
|
||||||
Config(),
|
Config(),
|
||||||
Config::object{{"nlist", 1638}, {"gpu_id", device_id}, {"metric_type", "L2"}},
|
Config::object{{"nlist", 100}, {"gpu_id", device_id}, {"metric_type", "L2"}},
|
||||||
Config(),
|
Config(),
|
||||||
Config::object{{"k", 10}}),
|
Config::object{{"k", 10}}),
|
||||||
std::make_tuple("GPUIVFPQ",
|
std::make_tuple("GPUIVFPQ",
|
||||||
|
@ -99,7 +99,7 @@ INSTANTIATE_TEST_CASE_P(IVFParameters, IVFTest,
|
||||||
Config::object{{"k", 10}}),
|
Config::object{{"k", 10}}),
|
||||||
std::make_tuple("GPUIVFSQ",
|
std::make_tuple("GPUIVFSQ",
|
||||||
Config(),
|
Config(),
|
||||||
Config::object{{"gpu_id", device_id}, {"nlist", 1638}, {"nbits", 8}, {"metric_type", "L2"}},
|
Config::object{{"gpu_id", device_id}, {"nlist", 100}, {"nbits", 8}, {"metric_type", "L2"}},
|
||||||
Config(),
|
Config(),
|
||||||
Config::object{{"k", 10}})
|
Config::object{{"k", 10}})
|
||||||
)
|
)
|
||||||
|
@ -386,8 +386,8 @@ class GPURESTEST
|
||||||
int64_t elems = 0;
|
int64_t elems = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
const int search_count = 100;
|
const int search_count = 10;
|
||||||
const int load_count = 30;
|
const int load_count = 3;
|
||||||
|
|
||||||
TEST_F(GPURESTEST, gpu_ivf_resource_test) {
|
TEST_F(GPURESTEST, gpu_ivf_resource_test) {
|
||||||
assert(!xb.empty());
|
assert(!xb.empty());
|
||||||
|
|
|
@ -25,7 +25,7 @@ class NSGInterfaceTest : public DataGen, public TestWithParam<::std::tuple<Confi
|
||||||
protected:
|
protected:
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
//Init_with_default();
|
//Init_with_default();
|
||||||
FaissGpuResourceMgr::GetInstance().InitDevice(DEVICE_ID, 1024*1024*200, 1024*1024*300, 2);
|
FaissGpuResourceMgr::GetInstance().InitDevice(DEVICE_ID, 1024*1024*200, 1024*1024*600, 2);
|
||||||
Generate(256, 1000000, 1);
|
Generate(256, 1000000, 1);
|
||||||
index_ = std::make_shared<NSG>();
|
index_ = std::make_shared<NSG>();
|
||||||
std::tie(train_cfg, search_cfg) = GetParam();
|
std::tie(train_cfg, search_cfg) = GetParam();
|
||||||
|
|
Loading…
Reference in New Issue