Skip to content

Commit

Permalink
fix(torch-frontend): fix failing test for miscellaneous_ops.torch.clo…
Browse files Browse the repository at this point in the history
…ne (#28202)
  • Loading branch information
marvlyngkhoi authored Feb 10, 2024
1 parent 47926c6 commit 568de6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ivy_tests/test_ivy/helpers/function_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -987,6 +987,11 @@ def test_frontend_function(
ret_ = ret_.data
if hasattr(first_array, "requires_grad"):
first_array = first_array.detach()
if hasattr(ret_, "requires_grad"):
ret_ = ret_.detach()
if backend_to_test == "tensorflow":
first_array = first_array.numpy()
ret_ = ret_.numpy()
assert not np.may_share_memory(first_array, ret_)
elif test_flags.inplace:
assert _is_frontend_array(ret)
Expand Down

0 comments on commit 568de6b

Please sign in to comment.