Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
85b136b3
M
milvus
项目概览
milvus
/
milvus
9 个月 前同步成功
通知
260
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
85b136b3
编写于
11月 01, 2019
作者:
X
xiaojun.lin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix bug #161
Former-commit-id: 5daf77b3344351a8030e53ff704b7e8bf1cce400
上级
87b80491
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
15 deletion
+14
-15
CHANGELOG.md
CHANGELOG.md
+2
-1
core/src/db/engine/ExecutionEngineImpl.cpp
core/src/db/engine/ExecutionEngineImpl.cpp
+2
-0
core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
...knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
+6
-14
core/src/index/unittest/test_ivf.cpp
core/src/index/unittest/test_ivf.cpp
+4
-0
未找到文件。
CHANGELOG.md
浏览文件 @
85b136b3
...
...
@@ -5,12 +5,13 @@ Please mark all change in change log and use the ticket from JIRA.
# Milvus 0.5.1 (TODO)
## Bug
-
\#
161 - Search IVFSQHybrid crash on gpu
## Feature
-
\#
90 - The server start error messages could be improved to enhance user experience
-
\#
104 - test_scheduler core dump
-
\#
115 - Using new structure for tasktable
-
\#
139 - New config opion use_gpu_threshold
-
\#
139 - New config op
t
ion use_gpu_threshold
## Improvement
-
\#
64 - Improvement dump function in scheduler
...
...
core/src/db/engine/ExecutionEngineImpl.cpp
浏览文件 @
85b136b3
...
...
@@ -256,6 +256,7 @@ ExecutionEngineImpl::Load(bool to_cache) {
Status
ExecutionEngineImpl
::
CopyToGpu
(
uint64_t
device_id
,
bool
hybrid
)
{
#if 0
if (hybrid) {
const std::string key = location_ + ".quantizer";
std::vector<uint64_t> gpus = scheduler::get_gpu_pool();
...
...
@@ -307,6 +308,7 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) {
}
return Status::OK();
}
#endif
auto
index
=
std
::
static_pointer_cast
<
VecIndex
>
(
cache
::
GpuCacheMgr
::
GetInstance
(
device_id
)
->
GetIndex
(
location_
));
bool
already_in_cache
=
(
index
!=
nullptr
);
...
...
core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
浏览文件 @
85b136b3
...
...
@@ -84,22 +84,14 @@ IVFSQHybrid::CopyGpuToCpu(const Config& config) {
VectorIndexPtr
IVFSQHybrid
::
CopyCpuToGpu
(
const
int64_t
&
device_id
,
const
Config
&
config
)
{
if
(
gpu_mode
!=
0
)
{
KNOWHERE_THROW_MSG
(
"Not a GpuIndex Type"
);
}
if
(
auto
res
=
FaissGpuResourceMgr
::
GetInstance
().
GetRes
(
device_id
))
{
ResScope
rs
(
res
,
device_id
,
false
);
faiss
::
gpu
::
GpuClonerOptions
option
;
option
.
allInGpu
=
true
;
faiss
::
IndexComposition
index_composition
;
index_composition
.
index
=
index_
.
get
();
index_composition
.
quantizer
=
nullptr
;
index_composition
.
mode
=
0
;
// copy all
auto
gpu_index
=
faiss
::
gpu
::
index_cpu_to_gpu
(
res
->
faiss_res
.
get
(),
device_id
,
&
index_composition
,
&
option
);
auto
idx
=
dynamic_cast
<
faiss
::
IndexIVF
*>
(
index_
.
get
());
idx
->
restore_quantizer
();
auto
gpu_index
=
faiss
::
gpu
::
index_cpu_to_gpu
(
res
->
faiss_res
.
get
(),
device_id
,
index_
.
get
(),
&
option
);
std
::
shared_ptr
<
faiss
::
Index
>
device_index
=
std
::
shared_ptr
<
faiss
::
Index
>
(
gpu_index
);
auto
new_idx
=
std
::
make_shared
<
IVFSQHybrid
>
(
device_index
,
device_id
,
res
);
return
new_idx
;
...
...
@@ -119,9 +111,9 @@ IVFSQHybrid::LoadImpl(const BinarySet& index_binary) {
void
IVFSQHybrid
::
search_impl
(
int64_t
n
,
const
float
*
data
,
int64_t
k
,
float
*
distances
,
int64_t
*
labels
,
const
Config
&
cfg
)
{
// std::lock_guard<std::mutex> lk(g_mutex);
// static int64_t search_count;
// ++search_count;
//
std::lock_guard<std::mutex> lk(g_mutex);
//
static int64_t search_count;
//
++search_count;
if
(
gpu_mode
==
2
)
{
GPUIVF
::
search_impl
(
n
,
data
,
k
,
distances
,
labels
,
cfg
);
...
...
core/src/index/unittest/test_ivf.cpp
浏览文件 @
85b136b3
...
...
@@ -213,6 +213,10 @@ TEST_P(IVFTest, clone_test) {
}
}
if
(
index_type
==
"IVFSQHybrid"
)
{
return
;
}
{
// copy to gpu
std
::
vector
<
std
::
string
>
support_idx_vec
{
"IVF"
,
"GPUIVF"
,
"IVFSQ"
,
"GPUIVFSQ"
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录