mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Merge pull request #650 from Yukikaze-CZR/0.6.0
IP search metric_type shouldn't be supported by IVF_PQ index on GPU v…
This commit is contained in:
commit
56e3b8feb1
@ -44,7 +44,9 @@ Please mark all change in change log and use the ticket from JIRA.
|
||||
- \#599 - Build index log is incorrect
|
||||
- \#602 - Optimizer specify wrong gpu_id
|
||||
- \#606 - No log generated during building index with CPU
|
||||
- \#616 - IP search metric_type is not supported by IVF_PQ index
|
||||
- \#631 - FAISS isn't compiled with O3 option
|
||||
- \#636 - [CPU] Create index PQ should be failed if table metric type set Inner Product
|
||||
- \#649 - Typo "partiton" should be "partition"
|
||||
- \#654 - Random crash when frequently insert vector one by one
|
||||
- \#658 - Milvus error out when building SQ8H index without GPU resources
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
// under the License.
|
||||
|
||||
#include "server/grpc_impl/request/CreateIndexRequest.h"
|
||||
#include "server/Config.h"
|
||||
#include "server/DBWrapper.h"
|
||||
#include "utils/Log.h"
|
||||
#include "utils/TimeRecorder.h"
|
||||
@ -75,6 +76,20 @@ CreateIndexRequest::OnExecute() {
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
Status s;
|
||||
bool enable_gpu = false;
|
||||
server::Config& config = server::Config::GetInstance();
|
||||
s = config.GetGpuResourceConfigEnable(enable_gpu);
|
||||
engine::meta::TableSchema table_info;
|
||||
table_info.table_id_ = table_name_;
|
||||
status = DBWrapper::DB()->DescribeTable(table_info);
|
||||
if (s.ok() && grpc_index.index_type() == (int)engine::EngineType::FAISS_PQ &&
|
||||
table_info.metric_type_ == (int)engine::MetricType::IP) {
|
||||
return Status(SERVER_UNEXPECTED_ERROR, "PQ not support IP in GPU version!");
|
||||
}
|
||||
#endif
|
||||
|
||||
// step 2: check table existence
|
||||
engine::TableIndex index;
|
||||
index.engine_type_ = grpc_index.index_type();
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include "wrapper/ConfAdapter.h"
|
||||
#include "WrapperException.h"
|
||||
#include "knowhere/index/vector_index/helpers/IndexParameter.h"
|
||||
#include "server/Config.h"
|
||||
#include "utils/Log.h"
|
||||
|
||||
#include <cmath>
|
||||
@ -130,6 +131,17 @@ IVFPQConfAdapter::Match(const TempMetaConf& metaconf) {
|
||||
conf->nbits = 8;
|
||||
MatchBase(conf);
|
||||
|
||||
#ifdef MILVUS_GPU_VERSION
|
||||
Status s;
|
||||
bool enable_gpu = false;
|
||||
server::Config& config = server::Config::GetInstance();
|
||||
s = config.GetGpuResourceConfigEnable(enable_gpu);
|
||||
if (s.ok() && conf->metric_type == knowhere::METRICTYPE::IP) {
|
||||
WRAPPER_LOG_ERROR << "PQ not support IP in GPU version!";
|
||||
throw WrapperException("PQ not support IP in GPU version!");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Faiss 1.6
|
||||
* Only 1, 2, 3, 4, 6, 8, 10, 12, 16, 20, 24, 28, 32 dims per sub-quantizer are currently supported with
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user