Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
d6d745d2
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
d6d745d2
编写于
1月 27, 2022
作者:
Y
Yuang Liu
提交者:
GitHub
1月 27, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[fleet_executor] add flag to control timer (#39241)
上级
41a64351
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
9 deletion
+27
-9
paddle/fluid/distributed/fleet_executor/dist_model.cc
paddle/fluid/distributed/fleet_executor/dist_model.cc
+25
-9
paddle/fluid/distributed/fleet_executor/dist_model.h
paddle/fluid/distributed/fleet_executor/dist_model.h
+1
-0
paddle/fluid/pybind/bind_fleet_executor.cc
paddle/fluid/pybind/bind_fleet_executor.cc
+1
-0
未找到文件。
paddle/fluid/distributed/fleet_executor/dist_model.cc
浏览文件 @
d6d745d2
...
...
@@ -611,27 +611,43 @@ bool DistModel::Run(const std::vector<DistModelTensor> &input_data,
DistModelTimer
timer
;
timer
.
tic
();
double
feed_elapse
;
double
fleet_exe_elapse
;
double
fetch_elapse
;
if
(
!
FeedData
(
input_data
,
scope_
.
get
()))
{
LOG
(
ERROR
)
<<
"DistModel failed at feeding data."
;
return
false
;
}
double
feed_elapse
=
timer
.
toc
();
VLOG
(
3
)
<<
"Finish loading data, cost "
<<
feed_elapse
<<
"ms."
;
if
(
config_
.
enable_timer
)
{
feed_elapse
=
timer
.
toc
();
LOG
(
INFO
)
<<
"Finish loading data, cost "
<<
feed_elapse
<<
"ms."
;
}
else
{
VLOG
(
3
)
<<
"Finish loading data."
;
}
fleet_exe
->
Run
(
carrier_id_
);
double
fleet_exe_elapse
=
timer
.
toc
();
VLOG
(
3
)
<<
"Finish FleetExe running, cost "
<<
fleet_exe_elapse
-
feed_elapse
<<
"ms."
;
if
(
config_
.
enable_timer
)
{
fleet_exe_elapse
=
timer
.
toc
();
LOG
(
INFO
)
<<
"Finish FleetExe running, cost "
<<
fleet_exe_elapse
-
feed_elapse
<<
"ms."
;
}
else
{
VLOG
(
3
)
<<
"Finish FleetExe running."
;
}
if
(
!
FetchResults
(
output_data
,
scope_
.
get
()))
{
LOG
(
ERROR
)
<<
"DistModel failed at fetching result."
;
return
false
;
}
double
fetch_elapse
=
timer
.
toc
();
VLOG
(
3
)
<<
"Finish fetching data, cost "
<<
fetch_elapse
-
fleet_exe_elapse
<<
"ms."
;
VLOG
(
3
)
<<
"DistModel finish inf, cost "
<<
fetch_elapse
<<
"ms"
;
if
(
config_
.
enable_timer
)
{
fetch_elapse
=
timer
.
toc
();
LOG
(
INFO
)
<<
"Finish fetching data, cost "
<<
fetch_elapse
-
fleet_exe_elapse
<<
"ms."
;
LOG
(
INFO
)
<<
"DistModel finish inf, cost "
<<
fetch_elapse
<<
"ms"
;
}
else
{
VLOG
(
3
)
<<
"Finish fetching data."
;
VLOG
(
3
)
<<
"DistModel finish inf."
;
}
return
true
;
}
...
...
paddle/fluid/distributed/fleet_executor/dist_model.h
浏览文件 @
d6d745d2
...
...
@@ -52,6 +52,7 @@ struct DistModelConfig {
int64_t
mp_ring_id
{
-
1
};
int64_t
pp_upstream_ring_id
{
-
1
};
int64_t
pp_downstream_ring_id
{
-
1
};
bool
enable_timer
{
false
};
};
class
DistModel
{
...
...
paddle/fluid/pybind/bind_fleet_executor.cc
浏览文件 @
d6d745d2
...
...
@@ -154,6 +154,7 @@ void BindFleetExecutor(py::module* m) {
.
def_readwrite
(
"mp_degree"
,
&
DistModelConfig
::
mp_degree
)
.
def_readwrite
(
"pp_degree"
,
&
DistModelConfig
::
pp_degree
)
.
def_readwrite
(
"mp_ring_id"
,
&
DistModelConfig
::
mp_ring_id
)
.
def_readwrite
(
"enable_timer"
,
&
DistModelConfig
::
enable_timer
)
.
def_readwrite
(
"pp_upstream_ring_id"
,
&
DistModelConfig
::
pp_upstream_ring_id
)
.
def_readwrite
(
"pp_downstream_ring_id"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录