Loading core/src/db/engine/ExecutionEngineImpl.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,9 @@ ExecutionEngineImpl::Init() { server::Config& config = server::Config::GetInstance(); std::vector<int64_t> gpu_ids; Status s = config.GetGpuResourceConfigBuildIndexResources(gpu_ids); if (!s.ok()) { gpu_num_ = knowhere::INVALID_VALUE; } for (auto id : gpu_ids) { if (gpu_num_ == id) { return Status::OK(); Loading core/src/index/knowhere/knowhere/index/vector_index/IndexNSG.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -118,8 +118,7 @@ NSG::Train(const DatasetPtr& dataset, const Config& config) { // TODO(linxj): dev IndexFactory, support more IndexType Graph knng; #ifdef MILVUS_GPU_VERSION auto temp_resource = FaissGpuResourceMgr::GetInstance().GetRes(build_cfg->gpu_id); if (temp_resource == nullptr) { if (build_cfg->gpu_id == knowhere::INVALID_VALUE) { auto preprocess_index = std::make_shared<IVF>(); auto model = preprocess_index->Train(dataset, config); preprocess_index->set_index_model(model); Loading core/src/wrapper/ConfAdapter.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ void ConfAdapter::MatchBase(knowhere::Config conf) { if (conf->metric_type == knowhere::DEFAULT_TYPE) conf->metric_type = knowhere::METRICTYPE::L2; if (conf->gpu_id == knowhere::INVALID_VALUE) conf->gpu_id = 0; } knowhere::Config Loading Loading
core/src/db/engine/ExecutionEngineImpl.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,9 @@ ExecutionEngineImpl::Init() { server::Config& config = server::Config::GetInstance(); std::vector<int64_t> gpu_ids; Status s = config.GetGpuResourceConfigBuildIndexResources(gpu_ids); if (!s.ok()) { gpu_num_ = knowhere::INVALID_VALUE; } for (auto id : gpu_ids) { if (gpu_num_ == id) { return Status::OK(); Loading
core/src/index/knowhere/knowhere/index/vector_index/IndexNSG.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -118,8 +118,7 @@ NSG::Train(const DatasetPtr& dataset, const Config& config) { // TODO(linxj): dev IndexFactory, support more IndexType Graph knng; #ifdef MILVUS_GPU_VERSION auto temp_resource = FaissGpuResourceMgr::GetInstance().GetRes(build_cfg->gpu_id); if (temp_resource == nullptr) { if (build_cfg->gpu_id == knowhere::INVALID_VALUE) { auto preprocess_index = std::make_shared<IVF>(); auto model = preprocess_index->Train(dataset, config); preprocess_index->set_index_model(model); Loading
core/src/wrapper/ConfAdapter.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ void ConfAdapter::MatchBase(knowhere::Config conf) { if (conf->metric_type == knowhere::DEFAULT_TYPE) conf->metric_type = knowhere::METRICTYPE::L2; if (conf->gpu_id == knowhere::INVALID_VALUE) conf->gpu_id = 0; } knowhere::Config Loading