Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
39e127d7
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
7
Star
4
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,发现更多精彩内容 >>
提交
39e127d7
编写于
10月 29, 2019
作者:
X
xiaojun.lin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Upgrade Faiss to v1.6
Former-commit-id: 637f6933c77c2644d4d90120d9d2aed77e4e70ff
上级
789403b0
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
14 addition
and
11 deletion
+14
-11
core/src/db/engine/ExecutionEngineImpl.cpp
core/src/db/engine/ExecutionEngineImpl.cpp
+0
-2
core/src/index/cmake/ThirdPartyPackagesCore.cmake
core/src/index/cmake/ThirdPartyPackagesCore.cmake
+3
-3
core/src/index/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp
...ndex/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp
+2
-1
core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
...knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
+6
-1
core/src/scheduler/job/Job.cpp
core/src/scheduler/job/Job.cpp
+1
-1
core/unittest/db/test_engine.cpp
core/unittest/db/test_engine.cpp
+0
-1
core/unittest/db/utils.cpp
core/unittest/db/utils.cpp
+2
-2
未找到文件。
core/src/db/engine/ExecutionEngineImpl.cpp
浏览文件 @
39e127d7
...
...
@@ -257,7 +257,6 @@ ExecutionEngineImpl::Load(bool to_cache) {
Status
ExecutionEngineImpl
::
CopyToGpu
(
uint64_t
device_id
,
bool
hybrid
)
{
if
(
hybrid
)
{
#if 1
const
std
::
string
key
=
location_
+
".quantizer"
;
std
::
vector
<
uint64_t
>
gpus
=
scheduler
::
get_gpu_pool
();
...
...
@@ -306,7 +305,6 @@ ExecutionEngineImpl::CopyToGpu(uint64_t device_id, bool hybrid) {
auto
cached_quantizer
=
std
::
make_shared
<
CachedQuantizer
>
(
pair
.
second
);
cache
::
GpuCacheMgr
::
GetInstance
(
device_id
)
->
InsertItem
(
key
,
cached_quantizer
);
}
#endif
return
Status
::
OK
();
}
...
...
core/src/index/cmake/ThirdPartyPackagesCore.cmake
浏览文件 @
39e127d7
...
...
@@ -248,8 +248,8 @@ if(CUSTOMIZATION)
set
(
FAISS_MD5
"f3b2ce3364c3fa7febd3aa7fdd0fe380"
)
# commit-id 694e03458e6b69ce8a62502f71f69a614af5af8f branch-0.3.0
endif
()
else
()
set
(
FAISS_SOURCE_URL
"https://github.com/
facebookresearch/faiss/archive/v1.5.3
.tar.gz"
)
set
(
FAISS_MD5
"
0bc12737b23def156f6a1eb782050135
"
)
set
(
FAISS_SOURCE_URL
"https://github.com/
milvus-io/faiss/archive/1.6.0
.tar.gz"
)
set
(
FAISS_MD5
"
eb96d84f98b078a9eec04a796f5c792e
"
)
endif
()
message
(
STATUS
"FAISS URL =
${
FAISS_SOURCE_URL
}
"
)
...
...
core/src/index/knowhere/knowhere/index/vector_index/IndexGPUIVF.cpp
浏览文件 @
39e127d7
...
...
@@ -86,7 +86,8 @@ GPUIVF::SerializeImpl() {
faiss
::
Index
*
index
=
index_
.
get
();
faiss
::
Index
*
host_index
=
faiss
::
gpu
::
index_gpu_to_cpu
(
index
);
SealImpl
();
// TODO(linxj): support seal
// SealImpl();
faiss
::
write_index
(
host_index
,
&
writer
);
delete
host_index
;
...
...
core/src/index/knowhere/knowhere/index/vector_index/IndexIVFSQHybrid.cpp
浏览文件 @
39e127d7
...
...
@@ -160,7 +160,7 @@ IVFSQHybrid::LoadQuantizer(const Config& conf) {
index_composition
->
quantizer
=
nullptr
;
index_composition
->
mode
=
quantizer_conf
->
mode
;
// only 1
auto
gpu_index
=
faiss
::
gpu
::
index_cpu_to_gpu
(
res
->
faiss_res
.
get
(),
gpu_id
_
,
index_composition
,
&
option
);
auto
gpu_index
=
faiss
::
gpu
::
index_cpu_to_gpu
(
res
->
faiss_res
.
get
(),
gpu_id
,
index_composition
,
&
option
);
delete
gpu_index
;
auto
q
=
std
::
make_shared
<
FaissIVFQuantizer
>
();
...
...
@@ -354,5 +354,10 @@ IVFSQHybrid::LoadImpl(const BinarySet& index_binary) {
GPUIVF
::
LoadImpl
(
index_binary
);
}
void
IVFSQHybrid
::
set_index_model
(
IndexModelPtr
model
)
{
GPUIVF
::
set_index_model
(
model
);
}
#endif
}
// namespace knowhere
core/src/scheduler/job/Job.cpp
浏览文件 @
39e127d7
...
...
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
#include "Job.h"
#include "
scheduler/job/
Job.h"
namespace
milvus
{
namespace
scheduler
{
...
...
core/unittest/db/test_engine.cpp
浏览文件 @
39e127d7
...
...
@@ -108,7 +108,6 @@ TEST_F(EngineTest, ENGINE_IMPL_TEST) {
ASSERT_EQ
(
engine_ptr
->
Dimension
(),
dimension
);
ASSERT_EQ
(
engine_ptr
->
Count
(),
ids
.
size
());
status
=
engine_ptr
->
CopyToGpu
(
0
,
true
);
status
=
engine_ptr
->
CopyToGpu
(
0
,
false
);
//ASSERT_TRUE(status.ok());
...
...
core/unittest/db/utils.cpp
浏览文件 @
39e127d7
...
...
@@ -65,10 +65,10 @@ static const char
" cache_insert_data: false # whether load inserted data into cache
\n
"
"
\n
"
"engine_config:
\n
"
" blas_threshold: 20
\n
"
"
use_
blas_threshold: 20
\n
"
"
\n
"
"resource_config:
\n
"
"
resource_pool
:
\n
"
"
search_resources
:
\n
"
" - gpu0
\n
"
" index_build_device: gpu0 # GPU used for building index"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录