未验证 提交 d19b5da0 编写于 作者: L lilong12 提交者: GitHub

bug fix, test=develop (#32730)

上级 6b86e966
......@@ -4592,13 +4592,13 @@ class PipelineOptimizer(object):
origin_sub_block_id = op.attr('sub_block').id
origin_sub_block = main_program.block(origin_sub_block_id)
new_sub_block = prog._create_block(parent_idx=0)
for op in origin_sub_block.ops:
op_desc = op.desc
for sub_op in origin_sub_block.ops:
op_desc = sub_op.desc
ap_op = new_sub_block.desc.append_op()
ap_op.copy_from(op_desc)
new_sub_block._sync_with_cpp()
self._create_vars(new_sub_block, origin_sub_block)
op._set_attr('sub_block:', new_sub_block)
op._set_attr('sub_block', new_sub_block)
def _get_device_info(self, block):
for op in block.ops:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册