Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
adc77015
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,发现更多精彩内容 >>
提交
adc77015
编写于
8月 03, 2019
作者:
X
xj.lin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MS-307 enable-nsg
Former-commit-id: 5ed714d17e5ad58b610fd01d1041eb11203b15bf
上级
3db2702a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
8 deletion
+10
-8
cpp/src/db/ExecutionEngine.h
cpp/src/db/ExecutionEngine.h
+1
-1
cpp/src/wrapper/knowhere/vec_index.cpp
cpp/src/wrapper/knowhere/vec_index.cpp
+5
-3
cpp/thirdparty/knowhere
cpp/thirdparty/knowhere
+1
-1
cpp/unittest/index_wrapper/knowhere_test.cpp
cpp/unittest/index_wrapper/knowhere_test.cpp
+3
-3
未找到文件。
cpp/src/db/ExecutionEngine.h
浏览文件 @
adc77015
...
...
@@ -20,7 +20,7 @@ enum class EngineType {
FAISS_IVFFLAT
,
FAISS_IVFSQ8
,
NSG_MIX
,
MAX_VALUE
=
FAISS_IVFSQ8
,
MAX_VALUE
=
NSG_MIX
,
};
class
ExecutionEngine
{
...
...
cpp/src/wrapper/knowhere/vec_index.cpp
浏览文件 @
adc77015
...
...
@@ -203,11 +203,13 @@ void AutoGenParams(const IndexType &type, const long &size, zilliz::knowhere::Co
case
IndexType
::
NSG_MIX
:
{
auto
scale_factor
=
round
(
cfg
[
"dim"
].
as
<
int
>
()
/
128.0
);
scale_factor
=
scale_factor
>=
4
?
4
:
scale_factor
;
if
(
!
cfg
.
contains
(
"nprobe"
))
{
cfg
[
"nprobe"
]
=
16
+
10
*
scale_factor
;
}
cfg
[
"nlist"
]
=
int
(
size
/
1000000.0
*
8192
);
if
(
!
cfg
.
contains
(
"nprobe"
))
{
cfg
[
"nprobe"
]
=
6
+
10
*
scale_factor
;
}
if
(
!
cfg
.
contains
(
"knng"
))
{
cfg
[
"knng"
]
=
100
+
100
*
scale_factor
;
}
if
(
!
cfg
.
contains
(
"search_length"
))
{
cfg
[
"search_length"
]
=
30
+
10
*
scale_factor
;
}
if
(
!
cfg
.
contains
(
"out_degree"
))
{
cfg
[
"out_degree"
]
=
4
0
+
5
*
scale_factor
;
}
if
(
!
cfg
.
contains
(
"search_length"
))
{
cfg
[
"search_length"
]
=
40
+
5
*
scale_factor
;
}
if
(
!
cfg
.
contains
(
"out_degree"
))
{
cfg
[
"out_degree"
]
=
5
0
+
5
*
scale_factor
;
}
if
(
!
cfg
.
contains
(
"candidate_pool_size"
))
{
cfg
[
"candidate_pool_size"
]
=
200
+
100
*
scale_factor
;
}
WRAPPER_LOG_DEBUG
<<
pretty_print
(
cfg
);
break
;
}
}
...
...
knowhere
@
6a4f242e
Subproject commit
5032e91e3d8bee1760c3f86f7eb4c857e59546ad
Subproject commit
6a4f242ec40c539f1e6d9a7305282f7ff03c19d2
cpp/unittest/index_wrapper/knowhere_test.cpp
浏览文件 @
adc77015
...
...
@@ -110,9 +110,9 @@ INSTANTIATE_TEST_CASE_P(WrapperParam, KnowhereWrapperTest,
Config
::
object
{{
"dim"
,
64
},
{
"k"
,
10
},
{
"nprobe"
,
5
}}
),
std
::
make_tuple
(
IndexType
::
NSG_MIX
,
"Default"
,
128
,
10
0000
,
10
,
10
,
Config
::
object
{{
"dim"
,
128
},
{
"nlist"
,
1638
},
{
"nprobe"
,
10
},
{
"metric_type"
,
"L2"
},
{
"knng"
,
50
},
{
"search_length"
,
40
},
{
"out_degree"
,
3
0
},
{
"candidate_pool_size"
,
200
}},
128
,
25
0000
,
10
,
10
,
Config
::
object
{{
"dim"
,
128
},
{
"nlist"
,
8192
},
{
"nprobe"
,
16
},
{
"metric_type"
,
"L2"
},
{
"knng"
,
200
},
{
"search_length"
,
40
},
{
"out_degree"
,
6
0
},
{
"candidate_pool_size"
,
200
}},
Config
::
object
{{
"k"
,
10
},
{
"search_length"
,
20
}}
)
//std::make_tuple(IndexType::SPTAG_KDT_RNT_CPU, "Default",
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录