Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
7ad5c514
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,发现更多精彩内容 >>
提交
7ad5c514
编写于
11月 19, 2019
作者:
W
wxyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add virtual method Init() in Pass abstract class close #404
上级
00a21da4
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
39 addition
and
13 deletion
+39
-13
CHANGELOG.md
CHANGELOG.md
+1
-0
core/src/scheduler/SchedInst.cpp
core/src/scheduler/SchedInst.cpp
+1
-0
core/src/scheduler/optimizer/HybridPass.cpp
core/src/scheduler/optimizer/HybridPass.cpp
+4
-0
core/src/scheduler/optimizer/HybridPass.h
core/src/scheduler/optimizer/HybridPass.h
+3
-0
core/src/scheduler/optimizer/LargeSQ8HPass.cpp
core/src/scheduler/optimizer/LargeSQ8HPass.cpp
+2
-1
core/src/scheduler/optimizer/LargeSQ8HPass.h
core/src/scheduler/optimizer/LargeSQ8HPass.h
+4
-1
core/src/scheduler/optimizer/OnlyCPUPass.cpp
core/src/scheduler/optimizer/OnlyCPUPass.cpp
+4
-0
core/src/scheduler/optimizer/OnlyCPUPass.h
core/src/scheduler/optimizer/OnlyCPUPass.h
+3
-0
core/src/scheduler/optimizer/OnlyGPUPass.cpp
core/src/scheduler/optimizer/OnlyGPUPass.cpp
+4
-0
core/src/scheduler/optimizer/OnlyGPUPass.h
core/src/scheduler/optimizer/OnlyGPUPass.h
+3
-0
core/src/scheduler/optimizer/Optimizer.cpp
core/src/scheduler/optimizer/Optimizer.cpp
+6
-6
core/src/scheduler/optimizer/Optimizer.h
core/src/scheduler/optimizer/Optimizer.h
+2
-2
core/src/scheduler/optimizer/Pass.h
core/src/scheduler/optimizer/Pass.h
+2
-3
未找到文件。
CHANGELOG.md
浏览文件 @
7ad5c514
...
...
@@ -29,6 +29,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
\#
322 - Add option to enable / disable prometheus
-
\#
358 - Add more information in build.sh and install.md
-
\#
255 - Add ivfsq8 test report detailed version
-
\#
404 - Add virtual method Init() in Pass abstract class
## Task
...
...
core/src/scheduler/SchedInst.cpp
浏览文件 @
7ad5c514
...
...
@@ -84,6 +84,7 @@ load_simple_config() {
void
StartSchedulerService
()
{
load_simple_config
();
OptimizerInst
::
GetInstance
()
->
Init
();
ResMgrInst
::
GetInstance
()
->
Start
();
SchedInst
::
GetInstance
()
->
Start
();
JobMgrInst
::
GetInstance
()
->
Start
();
...
...
core/src/scheduler/optimizer/HybridPass.cpp
浏览文件 @
7ad5c514
...
...
@@ -23,6 +23,10 @@
namespace
milvus
{
namespace
scheduler
{
void
HybridPass
::
Init
()
{
}
bool
HybridPass
::
Run
(
const
TaskPtr
&
task
)
{
// TODO: future, Index::IVFSQ8H, if nq < threshold set cpu, else set gpu
...
...
core/src/scheduler/optimizer/HybridPass.h
浏览文件 @
7ad5c514
...
...
@@ -37,6 +37,9 @@ class HybridPass : public Pass {
HybridPass
()
=
default
;
public:
void
Init
()
override
;
bool
Run
(
const
TaskPtr
&
task
)
override
;
};
...
...
core/src/scheduler/optimizer/LargeSQ8HPass.cpp
浏览文件 @
7ad5c514
...
...
@@ -27,7 +27,8 @@
namespace
milvus
{
namespace
scheduler
{
LargeSQ8HPass
::
LargeSQ8HPass
()
{
void
LargeSQ8HPass
::
Init
()
{
server
::
Config
&
config
=
server
::
Config
::
GetInstance
();
Status
s
=
config
.
GetEngineConfigGpuSearchThreshold
(
threshold_
);
if
(
!
s
.
ok
())
{
...
...
core/src/scheduler/optimizer/LargeSQ8HPass.h
浏览文件 @
7ad5c514
...
...
@@ -35,9 +35,12 @@ namespace scheduler {
class
LargeSQ8HPass
:
public
Pass
{
public:
LargeSQ8HPass
();
LargeSQ8HPass
()
=
default
;
public:
void
Init
()
override
;
bool
Run
(
const
TaskPtr
&
task
)
override
;
...
...
core/src/scheduler/optimizer/OnlyCPUPass.cpp
浏览文件 @
7ad5c514
...
...
@@ -24,6 +24,10 @@
namespace
milvus
{
namespace
scheduler
{
void
OnlyCPUPass
::
Init
()
{
}
bool
OnlyCPUPass
::
Run
(
const
TaskPtr
&
task
)
{
if
(
task
->
Type
()
!=
TaskType
::
SearchTask
)
...
...
core/src/scheduler/optimizer/OnlyCPUPass.h
浏览文件 @
7ad5c514
...
...
@@ -37,6 +37,9 @@ class OnlyCPUPass : public Pass {
OnlyCPUPass
()
=
default
;
public:
void
Init
()
override
;
bool
Run
(
const
TaskPtr
&
task
)
override
;
};
...
...
core/src/scheduler/optimizer/OnlyGPUPass.cpp
浏览文件 @
7ad5c514
...
...
@@ -27,6 +27,10 @@ namespace scheduler {
OnlyGPUPass
::
OnlyGPUPass
(
bool
has_cpu
)
:
has_cpu_
(
has_cpu
)
{
}
void
OnlyGPUPass
::
Init
()
{
}
bool
OnlyGPUPass
::
Run
(
const
TaskPtr
&
task
)
{
if
(
task
->
Type
()
!=
TaskType
::
SearchTask
||
has_cpu_
)
...
...
core/src/scheduler/optimizer/OnlyGPUPass.h
浏览文件 @
7ad5c514
...
...
@@ -37,6 +37,9 @@ class OnlyGPUPass : public Pass {
explicit
OnlyGPUPass
(
bool
has_cpu
);
public:
void
Init
()
override
;
bool
Run
(
const
TaskPtr
&
task
)
override
;
...
...
core/src/scheduler/optimizer/Optimizer.cpp
浏览文件 @
7ad5c514
...
...
@@ -20,12 +20,12 @@
namespace
milvus
{
namespace
scheduler
{
//
void
//
Optimizer::Init() {
//
for (auto& pass : pass_list_) {
//
pass->Init();
//
}
//
}
void
Optimizer
::
Init
()
{
for
(
auto
&
pass
:
pass_list_
)
{
pass
->
Init
();
}
}
bool
Optimizer
::
Run
(
const
TaskPtr
&
task
)
{
...
...
core/src/scheduler/optimizer/Optimizer.h
浏览文件 @
7ad5c514
...
...
@@ -38,8 +38,8 @@ class Optimizer {
explicit
Optimizer
(
std
::
vector
<
PassPtr
>
pass_list
)
:
pass_list_
(
std
::
move
(
pass_list
))
{
}
//
void
//
Init();
void
Init
();
bool
Run
(
const
TaskPtr
&
task
);
...
...
core/src/scheduler/optimizer/Pass.h
浏览文件 @
7ad5c514
...
...
@@ -34,9 +34,8 @@ namespace scheduler {
class
Pass
{
public:
// virtual void
// Init() {
// }
virtual
void
Init
()
=
0
;
virtual
bool
Run
(
const
TaskPtr
&
task
)
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录