未验证 提交 53803202 编写于 作者: C Chen Weihang 提交者: GitHub

add rename var in block (#27705)

上级 719309a8
......@@ -139,6 +139,7 @@ def _append_loaded_suffix_to_var(program_desc):
var_desc.set_name(new_name)
for block_idx in six.moves.range(program_desc.num_blocks()):
block = program_desc.block(block_idx)
block._rename_var(cpt.to_bytes(old_name), cpt.to_bytes(new_name))
for op_idx in six.moves.range(block.op_size()):
op = block.op(op_idx)
op._rename_input(old_name, new_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册