mirror of https://github.com/milvus-io/milvus.git
Support IVF_PQ on GPU with using metric_type IP (#2593)
* Support IVF_PQ on GPU with using metric_type IP Signed-off-by: shengjun.li <shengjun.li@zilliz.com> * remove useless code Signed-off-by: shengjun.li <shengjun.li@zilliz.com>pull/2615/head
parent
508da260ca
commit
290ff2e439
|
@ -5,6 +5,9 @@ Please mark all change in change log and use the issue from GitHub
|
|||
# Milvus 0.10.1 (TBD)
|
||||
|
||||
## Bug
|
||||
- \#2585 IVF_PQ on GPU with using metric_type IP
|
||||
- \#2578 Result count doesn't match target vectors count
|
||||
- \#2557 fix random crash of INSERT_DUPLICATE_ID case
|
||||
|
||||
## Feature
|
||||
|
||||
|
|
|
@ -138,16 +138,11 @@ IVFPQConfAdapter::CheckTrain(Config& oricfg, const IndexMode mode) {
|
|||
static int64_t DEFAULT_NBITS = 8;
|
||||
static int64_t MAX_NLIST = 999999;
|
||||
static int64_t MIN_NLIST = 1;
|
||||
static std::vector<std::string> CPU_METRICS{knowhere::Metric::L2, knowhere::Metric::IP};
|
||||
static std::vector<std::string> GPU_METRICS{knowhere::Metric::L2};
|
||||
static std::vector<std::string> METRICS{knowhere::Metric::L2, knowhere::Metric::IP};
|
||||
|
||||
oricfg[knowhere::IndexParams::nbits] = DEFAULT_NBITS;
|
||||
|
||||
if (mode == IndexMode::MODE_GPU) {
|
||||
CheckStrByValues(knowhere::Metric::TYPE, GPU_METRICS);
|
||||
} else {
|
||||
CheckStrByValues(knowhere::Metric::TYPE, CPU_METRICS);
|
||||
}
|
||||
CheckStrByValues(knowhere::Metric::TYPE, METRICS);
|
||||
CheckIntByRange(knowhere::meta::DIM, DEFAULT_MIN_DIM, DEFAULT_MAX_DIM);
|
||||
CheckIntByRange(knowhere::meta::ROWS, DEFAULT_MIN_ROWS, DEFAULT_MAX_ROWS);
|
||||
CheckIntByRange(knowhere::IndexParams::nlist, MIN_NLIST, MAX_NLIST);
|
||||
|
|
|
@ -96,20 +96,6 @@ CreateIndexRequest::OnExecute() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
Status s;
|
||||
bool enable_gpu = false;
|
||||
server::Config& config = server::Config::GetInstance();
|
||||
s = config.GetGpuResourceConfigEnable(enable_gpu);
|
||||
fiu_do_on("CreateIndexRequest.OnExecute.ip_meteric",
|
||||
collection_info.metric_type_ = static_cast<int>(engine::MetricType::IP));
|
||||
|
||||
if (s.ok() && adapter_index_type == (int)engine::EngineType::FAISS_PQ &&
|
||||
collection_info.metric_type_ == (int)engine::MetricType::IP) {
|
||||
return Status(SERVER_UNEXPECTED_ERROR, "PQ not support IP in GPU version!");
|
||||
}
|
||||
#endif
|
||||
|
||||
rc.RecordSection("check validation");
|
||||
|
||||
// step 3: create index
|
||||
|
|
|
@ -252,14 +252,6 @@ TEST_F(RpcHandlerTest, INDEX_TEST) {
|
|||
ASSERT_TRUE(grpc_status.ok());
|
||||
fiu_disable("CreateIndexRequest.OnExecute.create_index_fail");
|
||||
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
request.set_index_type(static_cast<int>(milvus::engine::EngineType::FAISS_PQ));
|
||||
fiu_enable("CreateIndexRequest.OnExecute.ip_meteric", 1, NULL, 0);
|
||||
grpc_status = handler->CreateIndex(&context, &request, &response);
|
||||
ASSERT_TRUE(grpc_status.ok());
|
||||
fiu_disable("CreateIndexRequest.OnExecute.ip_meteric");
|
||||
#endif
|
||||
|
||||
::milvus::grpc::CollectionName collection_name;
|
||||
::milvus::grpc::IndexParam index_param;
|
||||
handler->DescribeIndex(&context, &collection_name, &index_param);
|
||||
|
|
Loading…
Reference in New Issue