Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Oneflow-Inc
oneflow
提交
c7495e06
O
oneflow
项目概览
Oneflow-Inc
/
oneflow
上一次同步 接近 3 年
通知
13
Star
2733
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oneflow
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c7495e06
编写于
7月 05, 2017
作者:
W
willzhang4a58
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TryActUntilFail
上级
a36c57f2
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
18 addition
and
18 deletion
+18
-18
oneflow/core/actor/actor.cpp
oneflow/core/actor/actor.cpp
+1
-1
oneflow/core/actor/actor.h
oneflow/core/actor/actor.h
+1
-1
oneflow/core/actor/boxing_actor.cpp
oneflow/core/actor/boxing_actor.cpp
+2
-2
oneflow/core/actor/bp_data_comp_actor.cpp
oneflow/core/actor/bp_data_comp_actor.cpp
+2
-2
oneflow/core/actor/copy_comm_net_actor.cpp
oneflow/core/actor/copy_comm_net_actor.cpp
+2
-2
oneflow/core/actor/copy_hd_actor.cpp
oneflow/core/actor/copy_hd_actor.cpp
+2
-2
oneflow/core/actor/fw_data_comp_actor.cpp
oneflow/core/actor/fw_data_comp_actor.cpp
+3
-3
oneflow/core/actor/model_diff_accumulate_actor.cpp
oneflow/core/actor/model_diff_accumulate_actor.cpp
+2
-2
oneflow/core/actor/model_save_comp_actor.cpp
oneflow/core/actor/model_save_comp_actor.cpp
+1
-1
oneflow/core/actor/model_update_comp_actor.cpp
oneflow/core/actor/model_update_comp_actor.cpp
+2
-2
未找到文件。
oneflow/core/actor/actor.cpp
浏览文件 @
c7495e06
...
...
@@ -68,7 +68,7 @@ int Actor::HandleWaitUntilReadingCntEqualZero(const ActorMsg& msg) {
return
0
;
}
void
Actor
::
Try
ActUntilFail
()
{
void
Actor
::
ActUntilFail
()
{
while
(
IsReadReady
()
&&
IsWriteReady
())
{
Act
();
}
}
...
...
oneflow/core/actor/actor.h
浏览文件 @
c7495e06
...
...
@@ -55,7 +55,7 @@ class Actor {
int
HandleWaitUntilReadingCntEqualZero
(
const
ActorMsg
&
msg
);
// Act
void
Try
ActUntilFail
();
void
ActUntilFail
();
virtual
void
Act
()
=
0
;
virtual
bool
IsReadReady
()
=
0
;
...
...
oneflow/core/actor/boxing_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -32,14 +32,14 @@ int BoxingActor::HandleNormal(const ActorMsg& msg) {
// do nothing
}
}
Try
ActUntilFail
();
ActUntilFail
();
return
0
;
}
int
BoxingActor
::
HandleWaitUntilNoReadableRegst
(
const
ActorMsg
&
msg
)
{
CHECK_EQ
(
TryUpdtStateAsProducedRegst
(
msg
.
regst_warpper
()
->
regst_raw_ptr
()),
0
);
Try
ActUntilFail
();
ActUntilFail
();
if
(
num_of_read_empty_
==
num_of_subscribed_regsts_
)
{
AsyncSendEORDMsgForAllProducedRegstDesc
();
if
(
total_reading_cnt
()
==
0
)
{
...
...
oneflow/core/actor/bp_data_comp_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -59,14 +59,14 @@ int BpDataCompActor::HandleNormal(const ActorMsg& msg) {
read_regst_
.
at
(
regst_wp
->
regst_desc_id
()).
push
(
regst_wp
);
}
}
Try
ActUntilFail
();
ActUntilFail
();
return
0
;
}
int
BpDataCompActor
::
HandleWaitUntilNoReadableRegst
(
const
ActorMsg
&
msg
)
{
CHECK_EQ
(
TryUpdtStateAsProducedRegst
(
msg
.
regst_warpper
()
->
regst_raw_ptr
()),
0
);
Try
ActUntilFail
();
ActUntilFail
();
if
(
read_regst_
.
at
(
activation_regst_desc_id_
).
empty
())
{
while
(
!
read_regst_
.
at
(
model_regst_desc_id_
).
empty
())
{
AsyncSendRegstMsgToProducer
(
read_regst_
.
at
(
model_regst_desc_id_
).
front
());
...
...
oneflow/core/actor/copy_comm_net_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -23,14 +23,14 @@ int CopyCommNetActor::HandleNormal(const ActorMsg& msg) {
.
second
);
}
}
Try
ActUntilFail
();
ActUntilFail
();
return
0
;
}
int
CopyCommNetActor
::
HandleWaitUntilNoReadableRegst
(
const
ActorMsg
&
msg
)
{
CHECK_EQ
(
TryUpdtStateAsProducedRegst
(
msg
.
regst_warpper
()
->
regst_raw_ptr
()),
0
);
Try
ActUntilFail
();
ActUntilFail
();
if
(
piece_id2waiting_in_regst_
.
empty
())
{
AsyncSendEORDMsgForAllProducedRegstDesc
();
if
(
total_reading_cnt
()
==
0
)
{
...
...
oneflow/core/actor/copy_hd_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -23,14 +23,14 @@ int CopyHdActor::HandleNormal(const ActorMsg& msg) {
waiting_in_regst_
.
push
(
msg
.
regst_warpper
());
}
}
Try
ActUntilFail
();
ActUntilFail
();
return
0
;
}
int
CopyHdActor
::
HandleWaitUntilNoReadableRegst
(
const
ActorMsg
&
msg
)
{
CHECK_EQ
(
TryUpdtStateAsProducedRegst
(
msg
.
regst_warpper
()
->
regst_raw_ptr
()),
0
);
Try
ActUntilFail
();
ActUntilFail
();
if
(
waiting_in_regst_
.
empty
())
{
AsyncSendEORDMsgForAllProducedRegstDesc
();
if
(
total_reading_cnt
()
==
0
)
{
...
...
oneflow/core/actor/fw_data_comp_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -52,7 +52,7 @@ bool FwDataCompActor::IsReadReady() {
int
FwDataCompActor
::
WaitToStart
(
const
ActorMsg
&
msg
)
{
CHECK_EQ
(
msg
.
actor_cmd
(),
ActorCmd
::
kStart
);
Try
ActUntilFail
();
ActUntilFail
();
OF_SET_MSG_HANDLE
(
&
FwDataCompActor
::
HandleWaitUntilNoReadableRegst
);
return
0
;
}
...
...
@@ -83,14 +83,14 @@ int FwDataCompActor::HandleNormal(const ActorMsg& msg) {
}
}
}
Try
ActUntilFail
();
ActUntilFail
();
return
0
;
}
int
FwDataCompActor
::
HandleWaitUntilNoReadableRegst
(
const
ActorMsg
&
msg
)
{
CHECK_EQ
(
TryUpdtStateAsProducedRegst
(
msg
.
regst_warpper
()
->
regst_raw_ptr
()),
0
);
Try
ActUntilFail
();
ActUntilFail
();
int
total_piece_num
=
JobDesc
::
Singleton
()
->
total_piece_num
();
if
((
in_desc_id_
!=
-
1
&&
in_
.
empty
())
||
expected_piece_id
()
==
total_piece_num
)
{
...
...
oneflow/core/actor/model_diff_accumulate_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -29,14 +29,14 @@ int MdDiffAccActor::HandleNormal(const ActorMsg& msg) {
waiting_in_regst_
.
push
(
msg
.
regst_warpper
());
}
}
Try
ActUntilFail
();
ActUntilFail
();
return
0
;
}
int
MdDiffAccActor
::
HandleWaitUntilNoReadableRegst
(
const
ActorMsg
&
msg
)
{
CHECK_EQ
(
TryUpdtStateAsProducedRegst
(
msg
.
regst_warpper
()
->
regst_raw_ptr
()),
0
);
Try
ActUntilFail
();
ActUntilFail
();
if
(
waiting_in_regst_
.
empty
())
{
AsyncSendEORDMsgForAllProducedRegstDesc
();
if
(
total_reading_cnt
()
==
0
)
{
...
...
oneflow/core/actor/model_save_comp_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -18,7 +18,7 @@ int MdSaveCompActor::HandleNormal(const ActorMsg& actor_msg) {
return
1
;
}
else
if
(
actor_msg
.
msg_type
()
==
ActorMsgType
::
kRegstMsg
)
{
regst_warpper_
=
actor_msg
.
regst_warpper
();
Try
ActUntilFail
();
ActUntilFail
();
}
else
{
UNEXPECTED_RUN
();
}
...
...
oneflow/core/actor/model_update_comp_actor.cpp
浏览文件 @
c7495e06
...
...
@@ -73,7 +73,7 @@ int MdUpdtCompActor::HandleNormal(const ActorMsg& actor_msg) {
if
(
TryUpdtStateAsProducedRegst
(
regst_warpper
->
regst_raw_ptr
())
!=
0
)
{
waiting_model_diff_acc_queue_
.
push
(
regst_warpper
);
}
Try
ActUntilFail
();
ActUntilFail
();
}
else
{
UNEXPECTED_RUN
();
}
...
...
@@ -84,7 +84,7 @@ int MdUpdtCompActor::HandleWaitUntilNoReadableRegst(const ActorMsg& actor_msg) {
CHECK_EQ
(
TryUpdtStateAsProducedRegst
(
actor_msg
.
regst_warpper
()
->
regst_raw_ptr
()),
0
);
Try
ActUntilFail
();
ActUntilFail
();
if
(
waiting_model_diff_acc_queue_
.
empty
())
{
AsyncSendEORDMsgToSubscribers
(
model_regst_desc_id_
);
if
(
total_reading_cnt
()
==
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录