Skip to content

Commit

Permalink
add value compare
Browse files Browse the repository at this point in the history
  • Loading branch information
FeixLiu committed Nov 25, 2022
1 parent 3e82eaa commit 7d87a36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions backends/mlu/tests/unittests/test_zero_dim_tensor_mlu.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def test_searchsorted(self):
out = paddle.searchsorted(x, y)

self.assertEqual(out.shape, [])
self.assertEqual(out.numpy(), 0)


# Use to test API whose zero-dim input tensors don't have grad and not need to test backward in OpTest.
Expand Down
1 change: 1 addition & 0 deletions backends/npu/tests/unittests/test_zero_dim_tensor_npu.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ def test_searchsorted(self):
out = paddle.searchsorted(x, y)

self.assertEqual(out.shape, [])
self.assertEqual(out.numpy(), 0)

# Use to test API whose zero-dim input tensors don't have grad and not need to test backward in OpTest.
class TestNoBackwardAPI(unittest.TestCase):
Expand Down

0 comments on commit 7d87a36

Please sign in to comment.