From f49d7bd105846e71f8b4dccf729fc83eaf5397f8 Mon Sep 17 00:00:00 2001 From: "xj.lin" Date: Mon, 9 Sep 2019 17:15:46 +0800 Subject: [PATCH] MS-526 1. Fix knowhere unittest again Former-commit-id: 1331f1b1b43571b577b3d55abd7802659f621819 --- cpp/src/core/test/test_ivf.cpp | 10 +++++----- cpp/src/core/test/test_nsg/test_nsg.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/src/core/test/test_ivf.cpp b/cpp/src/core/test/test_ivf.cpp index b2345a2ae7..1e91618e83 100644 --- a/cpp/src/core/test/test_ivf.cpp +++ b/cpp/src/core/test/test_ivf.cpp @@ -52,7 +52,7 @@ class IVFTest void SetUp() override { std::tie(index_type, preprocess_cfg, train_cfg, add_cfg, search_cfg) = GetParam(); //Init_with_default(); - Generate(128, 1000000/10, 10); + Generate(128, 1000000/100, 10); index_ = IndexFactory(index_type); 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}}), std::make_tuple("GPUIVF", 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::object{{"k", 10}}), std::make_tuple("GPUIVFPQ", @@ -99,7 +99,7 @@ INSTANTIATE_TEST_CASE_P(IVFParameters, IVFTest, Config::object{{"k", 10}}), std::make_tuple("GPUIVFSQ", 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::object{{"k", 10}}) ) @@ -386,8 +386,8 @@ class GPURESTEST int64_t elems = 0; }; -const int search_count = 100; -const int load_count = 30; +const int search_count = 10; +const int load_count = 3; TEST_F(GPURESTEST, gpu_ivf_resource_test) { assert(!xb.empty()); diff --git a/cpp/src/core/test/test_nsg/test_nsg.cpp b/cpp/src/core/test/test_nsg/test_nsg.cpp index 11b3af087e..50eccab272 100644 --- a/cpp/src/core/test/test_nsg/test_nsg.cpp +++ b/cpp/src/core/test/test_nsg/test_nsg.cpp @@ -25,7 +25,7 @@ class NSGInterfaceTest : public DataGen, public TestWithParam<::std::tuple(); std::tie(train_cfg, search_cfg) = GetParam();