From 1b0ef89e07a0a833aef208970111af30edc6e759 Mon Sep 17 00:00:00 2001 From: wxyu Date: Fri, 15 Nov 2019 19:45:17 +0800 Subject: [PATCH] fix flat search doesn't use gpu bug --- CHANGELOG.md | 1 + core/src/scheduler/optimizer/OnlyGPUPass.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 327b1f9b..590d5c15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Please mark all change in change log and use the ticket from JIRA. ## Bug - \#246 - Exclude src/external folder from code coverage for jenkin ci - \#248 - Reside src/external in thirdparty +- \#327 - Search does not use GPU when index type is FLAT ## Feature - \#12 - Pure CPU version for Milvus diff --git a/core/src/scheduler/optimizer/OnlyGPUPass.cpp b/core/src/scheduler/optimizer/OnlyGPUPass.cpp index 3fcda0e8..2a72f975 100644 --- a/core/src/scheduler/optimizer/OnlyGPUPass.cpp +++ b/core/src/scheduler/optimizer/OnlyGPUPass.cpp @@ -34,7 +34,8 @@ OnlyGPUPass::Run(const TaskPtr& task) { auto search_task = std::static_pointer_cast(task); if (search_task->file_->engine_type_ != (int)engine::EngineType::FAISS_IVFSQ8 && - search_task->file_->engine_type_ != (int)engine::EngineType::FAISS_IVFFLAT) { + search_task->file_->engine_type_ != (int)engine::EngineType::FAISS_IVFFLAT && + search_task->file_->engine_type_ != (int)engine::EngineType::FAISS_IDMAP) { return false; } -- GitLab