MCPcopy
hub / github.com/tinygrad/tinygrad / test_contiguous_view_realizes

Method test_contiguous_view_realizes

test/null/test_schedule.py:134–138  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

132 self.assertEqual(b.uop.base.buffer.size, 4)
133
134 def test_contiguous_view_realizes(self):
135 a = Tensor.empty(4)
136 b = a.expand((4, 4)).contiguous()
137 check_schedule(b, 1)
138 self.assertEqual(b.uop.base.buffer.size, 16)
139
140class TestSimpleSchedule(unittest.TestCase):
141 def test_reduce_doesnt_split(self):

Callers

nothing calls this directly

Calls 4

expandMethod · 0.80
check_scheduleFunction · 0.70
emptyMethod · 0.45
contiguousMethod · 0.45

Tested by

no test coverage detected