Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_35024513
milvus
提交
91b165d3
milvus
项目概览
qq_35024513
/
milvus
与 Fork 源项目一致
Fork自
milvus / milvus
通知
14
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
91b165d3
编写于
11月 30, 2019
作者:
J
Jin Hai
提交者:
GitHub
11月 30, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #624 from cydrain/caiyd_fix_gpu_index
fix gpu index build hang when gpu resources disabled
上级
6f58f755
de440aca
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
13 deletion
+18
-13
CHANGELOG.md
CHANGELOG.md
+1
-0
core/src/db/DBImpl.cpp
core/src/db/DBImpl.cpp
+0
-4
core/src/db/engine/ExecutionEngineImpl.cpp
core/src/db/engine/ExecutionEngineImpl.cpp
+17
-9
未找到文件。
CHANGELOG.md
浏览文件 @
91b165d3
...
...
@@ -37,6 +37,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
\#
547 - NSG build failed using GPU-edition if set gpu_enable false
-
\#
552 - Server down during building index_type: IVF_PQ using GPU-edition
-
\#
561 - Milvus server should report exception/error message or terminate on mysql metadata backend error
-
\#
579 - Build index hang in GPU version when gpu_resources disabled
-
\#
599 - Build index log is incorrect
-
\#
602 - Optimizer specify wrong gpu_id
-
\#
606 - No log generated during building index with CPU
...
...
core/src/db/DBImpl.cpp
浏览文件 @
91b165d3
...
...
@@ -1033,11 +1033,7 @@ DBImpl::BuildTableIndexRecursively(const std::string& table_id, const TableIndex
if
(
!
failed_files
.
empty
())
{
std
::
string
msg
=
"Failed to build index for "
+
std
::
to_string
(
failed_files
.
size
())
+
((
failed_files
.
size
()
==
1
)
?
" file"
:
" files"
);
#ifdef MILVUS_GPU_VERSION
msg
+=
", file size is too large or gpu memory is not enough."
;
#else
msg
+=
", please double check index parameters."
;
#endif
return
Status
(
DB_ERROR
,
msg
);
}
...
...
core/src/db/engine/ExecutionEngineImpl.cpp
浏览文件 @
91b165d3
...
...
@@ -86,6 +86,11 @@ ExecutionEngineImpl::ExecutionEngineImpl(VecIndexPtr index, const std::string& l
VecIndexPtr
ExecutionEngineImpl
::
CreatetVecIndex
(
EngineType
type
)
{
#ifdef MILVUS_GPU_VERSION
server
::
Config
&
config
=
server
::
Config
::
GetInstance
();
bool
gpu_resource_enable
=
true
;
config
.
GetGpuResourceConfigEnable
(
gpu_resource_enable
);
#endif
std
::
shared_ptr
<
VecIndex
>
index
;
switch
(
type
)
{
case
EngineType
::
FAISS_IDMAP
:
{
...
...
@@ -94,18 +99,20 @@ ExecutionEngineImpl::CreatetVecIndex(EngineType type) {
}
case
EngineType
::
FAISS_IVFFLAT
:
{
#ifdef MILVUS_GPU_VERSION
i
ndex
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFFLAT_MIX
);
#else
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFFLAT_CPU
);
i
f
(
gpu_resource_enable
)
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFFLAT_MIX
);
else
#endif
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFFLAT_CPU
);
break
;
}
case
EngineType
::
FAISS_IVFSQ8
:
{
#ifdef MILVUS_GPU_VERSION
i
ndex
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFSQ8_MIX
);
#else
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFSQ8_CPU
);
i
f
(
gpu_resource_enable
)
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFSQ8_MIX
);
else
#endif
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFSQ8_CPU
);
break
;
}
case
EngineType
::
NSG_MIX
:
{
...
...
@@ -120,10 +127,11 @@ ExecutionEngineImpl::CreatetVecIndex(EngineType type) {
#endif
case
EngineType
::
FAISS_PQ
:
{
#ifdef MILVUS_GPU_VERSION
i
ndex
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFPQ_MIX
);
#else
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFPQ_CPU
);
i
f
(
gpu_resource_enable
)
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFPQ_MIX
);
else
#endif
index
=
GetVecIndexFactory
(
IndexType
::
FAISS_IVFPQ_CPU
);
break
;
}
case
EngineType
::
SPTAG_KDT
:
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录