Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
98571d5f
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
Fork自
milvus / milvus
通知
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,发现更多精彩内容 >>
提交
98571d5f
编写于
11月 14, 2019
作者:
Z
zirui.chen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
#127 makeNlist & unittest change
上级
9b1c57e0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
4 deletion
+20
-4
core/src/wrapper/ConfAdapter.cpp
core/src/wrapper/ConfAdapter.cpp
+12
-0
core/src/wrapper/ConfAdapter.h
core/src/wrapper/ConfAdapter.h
+4
-0
core/unittest/wrapper/test_wrapper.cpp
core/unittest/wrapper/test_wrapper.cpp
+4
-4
未找到文件。
core/src/wrapper/ConfAdapter.cpp
浏览文件 @
98571d5f
...
...
@@ -154,6 +154,18 @@ IVFPQConfAdapter::MatchSearch(const TempMetaConf& metaconf, const IndexType& typ
return
conf
;
}
int64_t
IVFPQConfAdapter
::
MatchNlist
(
const
int64_t
&
size
,
const
int64_t
&
nlist
)
{
if
(
size
<=
TYPICAL_COUNT
/
16384
+
1
)
{
// handle less row count, avoid nlist set to 0
return
1
;
}
else
if
(
int
(
size
/
TYPICAL_COUNT
)
*
nlist
<=
0
)
{
// calculate a proper nlist if nlist not specified or size less than TYPICAL_COUNT
return
int
(
size
/
TYPICAL_COUNT
*
16384
);
}
return
nlist
;
}
knowhere
::
Config
NSGConfAdapter
::
Match
(
const
TempMetaConf
&
metaconf
)
{
auto
conf
=
std
::
make_shared
<
knowhere
::
NSGCfg
>
();
...
...
core/src/wrapper/ConfAdapter.h
浏览文件 @
98571d5f
...
...
@@ -82,6 +82,10 @@ class IVFPQConfAdapter : public IVFConfAdapter {
knowhere
::
Config
MatchSearch
(
const
TempMetaConf
&
metaconf
,
const
IndexType
&
type
)
override
;
protected:
static
int64_t
MatchNlist
(
const
int64_t
&
size
,
const
int64_t
&
nlist
);
};
class
NSGConfAdapter
:
public
IVFConfAdapter
{
...
...
core/unittest/wrapper/test_wrapper.cpp
浏览文件 @
98571d5f
...
...
@@ -80,18 +80,18 @@ INSTANTIATE_TEST_CASE_P(WrapperParam, KnowhereWrapperTest,
#ifdef MILVUS_GPU_VERSION
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFFLAT_GPU
,
"Default"
,
DIM
,
NB
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFFLAT_MIX
,
"Default"
,
64
,
1000
00
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFFLAT_MIX
,
"Default"
,
64
,
1000
,
10
,
10
),
// std::make_tuple(milvus::engine::IndexType::FAISS_IVFSQ8_GPU, "Default", DIM, NB,
// 10, 10),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFSQ8_GPU
,
"Default"
,
DIM
,
NB
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFSQ8_MIX
,
"Default"
,
DIM
,
NB
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFPQ_MIX
,
"Default"
,
DIM
,
10
000
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFPQ_MIX
,
"Default"
,
64
,
1
000
,
10
,
10
),
// std::make_tuple(IndexType::NSG_MIX, "Default", 128, 250000, 10, 10),
#endif
// std::make_tuple(IndexType::SPTAG_KDT_RNT_CPU, "Default", 128, 250000, 10, 10),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IDMAP
,
"Default"
,
64
,
1000
00
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFFLAT_CPU
,
"Default"
,
64
,
1000
00
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IDMAP
,
"Default"
,
64
,
1000
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFFLAT_CPU
,
"Default"
,
64
,
1000
,
10
,
10
),
std
::
make_tuple
(
milvus
::
engine
::
IndexType
::
FAISS_IVFSQ8_CPU
,
"Default"
,
DIM
,
NB
,
10
,
10
)));
TEST_P
(
KnowhereWrapperTest
,
BASE_TEST
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录