未验证 提交 98c7a3e0 编写于 作者: K kangguangli 提交者: GitHub

[BugFix] fix random fail of test_bilinear_interp_v2_op (#55643)

* fix random fail of test_bilinear_interp_v2_op

* reset if compiledProgram
上级 03a2f187
......@@ -1211,13 +1211,21 @@ class OpTest(unittest.TestCase):
return
set_flags({"FLAGS_enable_new_ir_in_executor": True})
new_scope = paddle.static.Scope()
executor = Executor(place)
new_program = None
if isinstance(program, paddle.static.CompiledProgram):
new_program = fluid.CompiledProgram(
program._program, build_strategy=program._build_strategy
)
else:
new_program = program.clone()
ir_outs = executor.run(
program,
new_program,
feed=feed_map,
fetch_list=fetch_list,
return_numpy=False,
scope=new_scope,
)
assert len(outs) == len(
ir_outs
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册