Skip to content

Commit ff885fc

Browse files
authored
[INTEL_HPU] Fix arctan fail in unittest (#1633)
Signed-off-by: Fei Wang <[email protected]>
1 parent 1e976e2 commit ff885fc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backends/intel_hpu/tests/unittests/test_activation_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_out_name(self):
9898
exe = base.Executor(self.place)
9999
(result,) = exe.run(feed={"X": np_x}, fetch_list=[out])
100100
expected = np.arctan(np_x)
101-
self.assertEqual(result, expected)
101+
self.assertTrue(np.allclose(result, expected))
102102

103103
def test_dygraph(self):
104104
with base.dygraph.guard(self.place):

backends/intel_hpu/tests/unittests/test_pow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def test_out_name(self):
9898
exe = base.Executor(self.place)
9999
(result,) = exe.run(feed={"X": np_x}, fetch_list=[out])
100100
expected = np.arctan(np_x)
101-
self.assertEqual(result, expected)
101+
self.assertTrue(np.allclose(result, expected))
102102

103103
def test_dygraph(self):
104104
with base.dygraph.guard(self.place):

0 commit comments

Comments
 (0)