MCPcopy
hub / github.com/tinygrad/tinygrad / test_recursive_pad

Method test_recursive_pad

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

Source from the content-addressed store, hash-verified

1194 self.assertLess(time.perf_counter()-st, 2.0)
1195
1196 def test_recursive_pad(self):
1197 st = time.perf_counter()
1198 val = 1.0
1199 a = Tensor(val)
1200 for _ in range(24): a = Tensor.stack(a, a)[0]
1201 linear = a.schedule_linear()
1202 self.assertLessEqual(len(linear.src), 1)
1203 self.assertLess(time.perf_counter()-st, 2.0)
1204
1205 def test_recursive_reshape(self):
1206 st = time.perf_counter()

Callers

nothing calls this directly

Calls 3

schedule_linearMethod · 0.95
TensorClass · 0.90
stackMethod · 0.80

Tested by

no test coverage detected