Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MindSpore
graphengine
提交
2cb83c8f
G
graphengine
项目概览
MindSpore
/
graphengine
通知
6
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
graphengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2cb83c8f
编写于
8月 07, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
8月 07, 2020
浏览文件
操作
浏览文件
下载
差异文件
!52 Revert "Op debug feature"
Merge pull request !52 from yanghaoran/r0.6
上级
efd823cc
20f86e63
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
4 addition
and
32 deletion
+4
-32
inc/framework/ge_runtime/model_runner.h
inc/framework/ge_runtime/model_runner.h
+0
-5
src/ge/ge_runtime/model_runner.cc
src/ge/ge_runtime/model_runner.cc
+0
-19
src/ge/ge_runtime/runtime_model.cc
src/ge/ge_runtime/runtime_model.cc
+4
-6
src/ge/ge_runtime/runtime_model.h
src/ge/ge_runtime/runtime_model.h
+0
-2
未找到文件。
inc/framework/ge_runtime/model_runner.h
浏览文件 @
2cb83c8f
...
...
@@ -35,9 +35,6 @@ class ModelRunner {
bool
LoadDavinciModel
(
uint32_t
device_id
,
uint64_t
session_id
,
uint32_t
model_id
,
std
::
shared_ptr
<
DavinciModel
>
davinci_model
,
std
::
shared_ptr
<
ModelListener
>
listener
);
bool
DistributeTask
(
uint32_t
model_id
);
bool
LoadModelComplete
(
uint32_t
model_id
);
const
std
::
vector
<
uint32_t
>
&
GetTaskIdList
(
uint32_t
model_id
)
const
;
...
...
@@ -46,8 +43,6 @@ class ModelRunner {
const
std
::
map
<
std
::
string
,
std
::
shared_ptr
<
RuntimeInfo
>>
&
GetRuntimeInfoMap
(
uint32_t
model_id
)
const
;
void
*
GetModelHandle
(
uint32_t
model_id
)
const
;
bool
UnloadModel
(
uint32_t
model_id
);
bool
RunModel
(
uint32_t
model_id
,
const
InputData
&
input_data
,
OutputData
*
output_data
);
...
...
src/ge/ge_runtime/model_runner.cc
浏览文件 @
2cb83c8f
...
...
@@ -49,15 +49,6 @@ bool ModelRunner::LoadDavinciModel(uint32_t device_id, uint64_t session_id, uint
return
true
;
}
bool
ModelRunner
::
DistributeTask
(
uint32_t
model_id
)
{
auto
model_iter
=
runtime_models_
.
find
(
model_id
);
if
(
model_iter
==
runtime_models_
.
end
())
{
GELOGE
(
PARAM_INVALID
,
"Model id %u not found."
,
model_id
);
return
false
;
}
return
model_iter
->
second
->
DistributeTask
();
}
bool
ModelRunner
::
LoadModelComplete
(
uint32_t
model_id
)
{
auto
model_iter
=
runtime_models_
.
find
(
model_id
);
if
(
model_iter
==
runtime_models_
.
end
())
{
...
...
@@ -100,16 +91,6 @@ const std::map<std::string, std::shared_ptr<RuntimeInfo>> &ModelRunner::GetRunti
return
model_iter
->
second
->
GetRuntimeInfoMap
();
}
void
*
ModelRunner
::
GetModelHandle
(
uint32_t
model_id
)
const
{
auto
model_iter
=
runtime_models_
.
find
(
model_id
);
if
(
model_iter
==
runtime_models_
.
end
())
{
GELOGW
(
"Model id %u not found."
,
model_id
);
return
nullptr
;
}
return
model_iter
->
second
->
GetModelHandle
();
}
bool
ModelRunner
::
UnloadModel
(
uint32_t
model_id
)
{
auto
iter
=
runtime_models_
.
find
(
model_id
);
if
(
iter
!=
runtime_models_
.
end
())
{
...
...
src/ge/ge_runtime/runtime_model.cc
浏览文件 @
2cb83c8f
...
...
@@ -283,16 +283,14 @@ bool RuntimeModel::Load(uint32_t device_id, uint64_t session_id, std::shared_ptr
}
GenerateTask
(
device_id
,
session_id
,
davinci_model
);
return
status
;
}
bool
RuntimeModel
::
DistributeTask
()
{
bool
status
=
LoadTask
();
status
=
LoadTask
();
if
(
!
status
)
{
GELOGE
(
FAILED
,
"DistributeTask failed"
);
return
false
;
return
status
;
}
return
true
;
return
status
;
}
bool
RuntimeModel
::
Run
()
{
...
...
src/ge/ge_runtime/runtime_model.h
浏览文件 @
2cb83c8f
...
...
@@ -35,12 +35,10 @@ class RuntimeModel {
~
RuntimeModel
();
bool
Load
(
uint32_t
device_id
,
uint64_t
session_id
,
std
::
shared_ptr
<
DavinciModel
>
&
davinci_model
);
bool
DistributeTask
();
bool
LoadComplete
();
const
std
::
vector
<
uint32_t
>
&
GetTaskIdList
()
const
;
const
std
::
vector
<
uint32_t
>
&
GetStreamIdList
()
const
;
const
std
::
map
<
std
::
string
,
std
::
shared_ptr
<
RuntimeInfo
>>
&
GetRuntimeInfoMap
()
const
{
return
runtime_info_map_
;
}
rtModel_t
GetModelHandle
()
const
{
return
rt_model_handle_
;
}
bool
Run
();
bool
CopyInputData
(
const
InputData
&
input_data
);
bool
GetInputOutputDescInfo
(
bool
zero_copy
,
std
::
vector
<
InputOutputDescInfo
>
*
input_desc
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录