未验证 提交 190e8074 编写于 作者: K kangguangli 提交者: GitHub

fix bug in output check (#55164)

上级 71568672
...@@ -1146,21 +1146,25 @@ class OpTest(unittest.TestCase): ...@@ -1146,21 +1146,25 @@ class OpTest(unittest.TestCase):
fetch_list=fetch_list, fetch_list=fetch_list,
return_numpy=False, return_numpy=False,
) )
np.testing.assert_array_equal( assert len(outs) == len(
outs, ir_outs
ir_outs, ), "Fetch result should have same length when executed in new ir"
err_msg='Operator (' for i in range(len(outs)):
+ self.op_type np.testing.assert_array_equal(
+ ') has diff at ' outs[i],
+ str(place) ir_outs[i],
+ '\nExpect ' err_msg='Operator Check ('
+ str(outs) + self.op_type
+ '\n' + ') has diff at '
+ 'But Got' + str(place)
+ str(ir_outs) + '\nExpect '
+ ' in class ' + str(outs[i])
+ self.__class__.__name__, + '\n'
) + 'But Got'
+ str(ir_outs[i])
+ ' in class '
+ self.__class__.__name__,
)
set_flags({"FLAGS_enable_new_ir_in_executor": False}) set_flags({"FLAGS_enable_new_ir_in_executor": False})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册