Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
f5609de4
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2299
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f5609de4
编写于
12月 06, 2021
作者:
Y
Yuang Liu
提交者:
GitHub
12月 06, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[fleet_executor] remove should reset (#37862)
上级
7b1bb874
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
2 addition
and
30 deletion
+2
-30
paddle/fluid/distributed/fleet_executor/compute_interceptor.cc
...e/fluid/distributed/fleet_executor/compute_interceptor.cc
+2
-29
paddle/fluid/distributed/fleet_executor/compute_interceptor.h
...le/fluid/distributed/fleet_executor/compute_interceptor.h
+0
-1
未找到文件。
paddle/fluid/distributed/fleet_executor/compute_interceptor.cc
浏览文件 @
f5609de4
...
@@ -64,7 +64,7 @@ void ComputeInterceptor::IncreaseReady(int64_t up_id) {
...
@@ -64,7 +64,7 @@ void ComputeInterceptor::IncreaseReady(int64_t up_id) {
// source node has no upstream, data_is_ready is send by carrier or others
// source node has no upstream, data_is_ready is send by carrier or others
if
(
is_source_
&&
up_id
==
-
1
)
{
if
(
is_source_
&&
up_id
==
-
1
)
{
it
->
second
.
second
=
GetTaskNode
()
->
max_run_times
();
it
->
second
.
second
+
=
GetTaskNode
()
->
max_run_times
();
return
;
return
;
}
}
...
@@ -121,16 +121,6 @@ bool ComputeInterceptor::CanWriteOutput() {
...
@@ -121,16 +121,6 @@ bool ComputeInterceptor::CanWriteOutput() {
return
true
;
return
true
;
}
}
// only source node need reset
bool
ComputeInterceptor
::
ShouldReset
()
{
if
(
is_source_
&&
step_
==
node_
->
max_run_times
())
{
VLOG
(
3
)
<<
"Interceptor "
<<
GetInterceptorId
()
<<
" should reset for step: "
<<
step_
<<
"."
;
return
true
;
}
return
false
;
}
void
ComputeInterceptor
::
SendDataReadyToDownStream
()
{
void
ComputeInterceptor
::
SendDataReadyToDownStream
()
{
for
(
auto
&
outs
:
out_buffs_
)
{
for
(
auto
&
outs
:
out_buffs_
)
{
auto
down_id
=
outs
.
first
;
auto
down_id
=
outs
.
first
;
...
@@ -186,24 +176,7 @@ void ComputeInterceptor::RunOps() {
...
@@ -186,24 +176,7 @@ void ComputeInterceptor::RunOps() {
}
}
void
ComputeInterceptor
::
Run
()
{
void
ComputeInterceptor
::
Run
()
{
// If there is no limit, source interceptor can be executed
while
(
IsInputReady
()
&&
CanWriteOutput
())
{
// an unlimited number of times.
// Now source node can only run max_run_times.
if
(
ShouldReset
())
{
for
(
auto
&
out_buff
:
out_buffs_
)
{
// buffer is using
if
(
out_buff
.
second
.
second
!=
0
)
{
VLOG
(
3
)
<<
"Interceptor "
<<
GetInterceptorId
()
<<
" out buffer for downstream: "
<<
out_buff
.
first
<<
"'s counter is: "
<<
out_buff
.
second
.
second
<<
". Cannot be reset."
;
return
;
}
}
step_
=
0
;
// reset
}
while
(
IsInputReady
()
&&
CanWriteOutput
()
&&
!
ShouldReset
())
{
VLOG
(
3
)
<<
"id="
<<
GetInterceptorId
()
<<
" ComputeInterceptor running"
;
VLOG
(
3
)
<<
"id="
<<
GetInterceptorId
()
<<
" ComputeInterceptor running"
;
RunOps
();
RunOps
();
...
...
paddle/fluid/distributed/fleet_executor/compute_interceptor.h
浏览文件 @
f5609de4
...
@@ -39,7 +39,6 @@ class ComputeInterceptor : public Interceptor {
...
@@ -39,7 +39,6 @@ class ComputeInterceptor : public Interceptor {
void
DecreaseBuff
(
int64_t
down_id
);
void
DecreaseBuff
(
int64_t
down_id
);
bool
IsInputReady
();
bool
IsInputReady
();
bool
CanWriteOutput
();
bool
CanWriteOutput
();
bool
ShouldReset
();
void
Run
();
void
Run
();
void
Compute
(
const
InterceptorMessage
&
msg
);
void
Compute
(
const
InterceptorMessage
&
msg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录