qcom has not transfer (#8075)

* qcom alloc is not hcq alloc

* maybe base?

* test
This commit is contained in:
nimlgen
2024-12-06 14:45:01 +03:00
committed by GitHub
parent ce72fe1411
commit c0240855b9
3 changed files with 19 additions and 12 deletions

View File

@@ -398,6 +398,14 @@ class TestJit(unittest.TestCase):
for i in range(5):
np.testing.assert_equal(g(Tensor([i]*3), Tensor.ones(3), Tensor.zeros(3)).numpy(), np.array([i+1]*3))
def test_jitted_clone(self):
def f(a): return a.clone().realize()
jf = TinyJit(f)
for _ in range(5):
a = Tensor.randn(10, 10, device=Device.DEFAULT).realize()
ja = jf(a)
np.testing.assert_allclose(a.numpy(), ja.numpy(), atol=1e-4, rtol=1e-5)
@unittest.skipIf(CI and Device.DEFAULT in {"GPU", "CUDA", "METAL", "NV", "AMD"}, "no GPU CI")
def test_jitted_transfers(self):
d0, d1 = f"{Device.DEFAULT}:0", f"{Device.DEFAULT}:1"