tests from lowerer branch (#5339)

* tests from lowerer branch

* Update test_image_dtype.py

* Update test_image_dtype.py

* Update test_image_dtype.py
This commit is contained in:
George Hotz
2024-07-08 21:23:19 -07:00
committed by GitHub
parent 4ceab5d2b1
commit c13da83f12
5 changed files with 24 additions and 12 deletions

View File

@@ -42,6 +42,13 @@ class TestConv(unittest.TestCase):
print(ret.numpy())
def test_two_binops_no_rerun_small(self):
Tensor.no_grad = True
x = Tensor.rand(1,1,32,32)
w = Tensor.rand(1,1,3,3)
out = x.conv2d(w, padding=(1,1))
np.testing.assert_allclose(out.relu().numpy(), np.maximum(out.numpy(), 0))
def test_two_binops_no_rerun(self):
Tensor.no_grad = True
x = Tensor.randn(1,12,128,256)