MCPcopy
hub / github.com/tinygrad/tinygrad / test_chained_callify

Method test_chained_callify

test/unit/test_callify.py:54–61  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

52 self.assertListEqual(c.tolist(), [2.0, 4.0, 6.0])
53
54 def test_chained_callify(self):
55 a = Tensor([1.,2,3])
56 b = a + 1
57 b.callify()
58 b.realize()
59 c = b + 1
60 c.callify()
61 self.assertListEqual(c.tolist(), [3.0, 4.0, 5.0])
62
63 def test_gemm(self):
64 a = Tensor.ones(8, 8).contiguous()

Callers

nothing calls this directly

Calls 4

TensorClass · 0.90
callifyMethod · 0.80
realizeMethod · 0.80
tolistMethod · 0.45

Tested by

no test coverage detected