(self)
| 1170 | |
| 1171 | class TestFusionOp(unittest.TestCase): |
| 1172 | def test_recursive_add(self): |
| 1173 | st = time.perf_counter() |
| 1174 | a = Tensor([1,2,3,4]) |
| 1175 | for _ in range(24): a = a + a |
| 1176 | linear = a.schedule_linear() |
| 1177 | prg = to_program(linear.src[-1].src[0], renderer=Device[Device.DEFAULT].renderer) |
| 1178 | self.assertLess(time.perf_counter()-st, 2.0) |
| 1179 | assert len(prg.src[3].arg.splitlines()) < 250 |
| 1180 | |
| 1181 | def test_recursive_add_cmp(self): |
| 1182 | st = time.perf_counter() |
nothing calls this directly
no test coverage detected