mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
hotfix: test_jit_copyin
This commit is contained in:
@@ -111,6 +111,15 @@ class TestJit(unittest.TestCase):
|
||||
np.testing.assert_allclose(c.numpy(), a.numpy()+b.numpy(), atol=1e-4, rtol=1e-5)
|
||||
assert_jit_cache_len(add_array, 1)
|
||||
|
||||
def test_jit_copyin(self):
|
||||
@TinyJit
|
||||
def f(a):
|
||||
return a + Tensor([1,2,3])
|
||||
for _ in range(5):
|
||||
b = Tensor.randn(3)
|
||||
c = f(b)
|
||||
np.testing.assert_allclose(c.numpy(), b.numpy()+[1,2,3], atol=1e-4, rtol=1e-5)
|
||||
|
||||
def test_method_jit(self):
|
||||
class Fun:
|
||||
def __init__(self):
|
||||
|
||||
Reference in New Issue
Block a user