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

fix the bug in processing subblock in pipeline (#32727)

上级 a0f4ac54
......@@ -4604,13 +4604,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.
先完成此消息的编辑!
想要评论请 注册