MCPcopy
hub / github.com/tinygrad/tinygrad / test_both_expanded

Method test_both_expanded

test/null/test_uops_stats.py:50–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48
49 @unittest.skip("no longer supported")
50 def test_both_expanded(self):
51 # TODO: this probably should be a full write
52 a = Tensor.empty(1024, 1, dtype=dtypes.uint8).expand(1024, 1024)
53 b = Tensor.empty(1024, 1, dtype=dtypes.uint8).expand(1024, 1024)
54 _, mem = get_stats(a+b)
55 # rangeify is smart!
56 self.assertEqual(mem, 1024 + 2*1024) # 2 lil reads + 1 lil write
57
58 def test_self_add(self):
59 a = Tensor.empty(1024, 1024, dtype=dtypes.uint8)

Callers

nothing calls this directly

Calls 3

get_statsFunction · 0.85
expandMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected