-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace src tick with with wait and send ids #5603
Conversation
… Feat: add Kernel create fault-tolerant
…dev_cc_nn_graph_run
…replace_src_tick
const auto& input_lbi = op.BnInOp2Lbi(ibn); | ||
if (input_lbi.op_name() == src_op_name) { | ||
tick_op_conf.CopyFrom(op.op_conf()); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 break 不对吧,并不会阻止上面的 ForeEachOperator 的执行。 如果有多个 op 消费了 src_op_name 的 out 呢? 如何保证 tick_op_conf.CopyFrom 的唯一性呢? 我们会有多个 tick op 吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 src_tick_op -> tick_op 是唯一连接,所以后面检查了 tick_conf.tick_size() == 1,且 tick_conf.tick(0) == src_op_name/out
这里我改下 break,应该直接 return Maybe::Ok(); 了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接 return 也不能解决问题。。。。因为 ForEach 仍然会执行后续的 Op,如果有另外一个 op 的 input lbi 里也有这个 src_op_name 怎么办呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看了下 ForEachOperator 的实现,你说的对,它会一直遍历完所有的 operator,并没有提前终止的条件。
src_tick 目前的实现上不会直接连其他 op,它后面一定会跟一个 tick,见 CreateSourceTicksAndSrcSubsetTick
这里我换个方式实现,把检查挪到里面,然后在外面 copy 吧。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我们会有多个 tick 吗
const auto& input_lbi = op.BnInOp2Lbi(ibn); | ||
if (input_lbi.op_name() == src_op_name) { | ||
tick_op_conf.CopyFrom(op.op_conf()); | ||
return Maybe<void>::Ok(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 return 和 break 没有区别。但是改变不了上层的 ForEachOperator 的逻辑
Speed stats:
|
Speed stats:
|
Speed stats:
|
wait_in
的修改,source tick 从语义和用法上看最好别添加输入