summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorjustheuristic <justheuristic@gmail.com>2022-09-18 00:38:02 +0300
committerjustheuristic <justheuristic@gmail.com>2022-09-18 00:38:02 +0300
commitfa8e07c7c5186e18d9e2d45042814fe6e8d76d5a (patch)
treeddb7e66ac4c84d517e1a671d11e99ac7cfd9cfa2 /tests
parentab9dee062d791ef343ff5f9e8c2c85dc094219ed (diff)
more lenient threshold
Diffstat (limited to 'tests')
-rw-r--r--tests/test_autograd.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/test_autograd.py b/tests/test_autograd.py
index 4e4282a..0150fbb 100644
--- a/tests/test_autograd.py
+++ b/tests/test_autograd.py
@@ -372,10 +372,9 @@ def test_matmullt(
n = out_bnb.numel()
err = torch.abs(out_bnb - out_torch).mean().item()
# print(f'abs error {err:.4f}')
- out_error_rate = 0.0175 if dtype == torch.float16 else 0.02
idx = torch.isclose(out_bnb, out_torch, atol=0.01, rtol=0.1)
- assert (idx == 0).sum().item() <= n * out_error_rate
+ assert (idx == 0).sum().item() <= n * (0.0175 if dtype == torch.float16 else 0.02)
idx = torch.isclose(out_bnb, out_torch, atol=0.035, rtol=0.2)
assert (idx == 0).sum().item() <= n * 0.001