Skip to content

Commit

Permalink
[Operator] Fix tol accuracy of isclose op test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengyang committed Jul 10, 2024
1 parent c4d0e60 commit f3ae16b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_binary_pointwise_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,7 @@ def test_accuracy_where_scalar_other(shape, scalar, dtype):
) # 1: nan, 2: inf, 3: -inf, 4: inf vs -inf
def test_accuracy_isclose(shape, dtype, zero_tol, equal_nan, gen_nan):
rtol = (
torch.rand(1, dtype=torch.float32, device="cuda").item()
* (0.0001 if dtype in [torch.bfloat16, torch.float16] else 0.01)
torch.rand(1, dtype=torch.float32, device="cuda").item() * 0.0001
if not zero_tol
else 0
)
Expand Down

0 comments on commit f3ae16b

Please sign in to comment.