Skip to content

Commit

Permalink
Merge pull request FlagOpen#114 from FlagOpen/fix_test_isclose_202407
Browse files Browse the repository at this point in the history
[Operator] Fix tol accuracy of isclose op test
  • Loading branch information
zhzhcookie authored Jul 11, 2024
2 parents c4d0e60 + f3ae16b commit 064bc62
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 064bc62

Please sign in to comment.