atol in test_two_binops_no_rerun (#12387)

for RANGEIFY LLVM
This commit is contained in:
chenyu
2025-10-01 12:05:47 +08:00
committed by GitHub
parent da52006bde
commit 0662946fac

View File

@@ -51,8 +51,8 @@ class TestConv(unittest.TestCase):
w = Tensor.randn(32,12,3,3)
out = x.conv2d(w, stride=(2,2), padding=(1,1))
r1, r2 = out.relu(), (out-1)
np.testing.assert_allclose(r1.numpy(), np.maximum(out.numpy(), 0))
np.testing.assert_allclose(r2.numpy(), out.numpy() - 1)
np.testing.assert_allclose(r1.numpy(), np.maximum(out.numpy(), 0), atol=1e-6)
np.testing.assert_allclose(r2.numpy(), out.numpy() - 1, atol=1e-6)
def test_two_overlapping_binops_no_rerun(self):
x = Tensor.randn(1,12,16,32)