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

fix bug in output check (#55164)

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