提交 e69de096 编写于 作者: T typhoonzero

remove redundent pserver block

上级 35483a20
......@@ -420,13 +420,14 @@ class DistributeTranspiler:
# append op to the current block
per_opt_block = append_block
for _, opt_op in enumerate(opt_op_on_pserver):
for idx, opt_op in enumerate(opt_op_on_pserver):
for _, op in enumerate(self.optimize_ops):
# optimizer is connected to itself
if ufind.is_connected(op, opt_op) and \
op not in global_ops:
__append_optimize_op__(op, per_opt_block)
per_opt_block = pserver_program.create_block(append_block.idx)
if idx == len(opt_op_on_pserver) - 1 and global_ops:
per_opt_block = pserver_program.create_block(append_block.idx)
# append global ops
for glb_op in global_ops:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册