Skip to content

Commit

Permalink
relax test tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Ainsworth committed Oct 28, 2023
1 parent a94f785 commit cfefd79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_all_the_things.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def test_oneliners():
t2j_function_test(torch.mean, [(5,)], atol=1e-6)
t2j_function_test(torch.sqrt, [(5,)])
t2j_function_test(torch.sum, [(5,)], atol=1e-6)
t2j_function_test(lambda x: 3 * x.sum(), [(5,)])
t2j_function_test(lambda x: 3 * torch.sum(x), [(5,)])
t2j_function_test(lambda x: 3 * x.sum(), [(5,)], atol=1e-6)
t2j_function_test(lambda x: 3 * torch.sum(x), [(5,)], atol=1e-6)

# Seems like an innocent test, but this can cause segfaults when using dlpack in t2j_array
t2j_function_test(lambda x: torch.Tensor([3.0]) * torch.mean(x), [(5,)], atol=1e-6)
Expand Down

0 comments on commit cfefd79

Please sign in to comment.