(self)
| 7 | |
| 8 | class TestLinearizerFailures(unittest.TestCase): |
| 9 | def test_fail_1(self): |
| 10 | c0 = UOp(Ops.PARAM, dtypes.float.ptr(64), arg=0, src=()) |
| 11 | c1 = UOp.range(UOp.const(dtypes.weakint, 2), 1, AxisType.LOOP) |
| 12 | c2 = UOp.range(UOp.const(dtypes.weakint, 32), 2, AxisType.LOOP) |
| 13 | c3 = ((c1*UOp.const(dtypes.weakint, 32))+c2) |
| 14 | c4 = UOp(Ops.PARAM, dtypes.float.ptr(163840), arg=1, src=()) |
| 15 | c5 = UOp.range(UOp.const(dtypes.weakint, 2560), 0, AxisType.REDUCE) |
| 16 | c6 = c4.index(((((((c5//UOp.const(dtypes.weakint, 8))%UOp.const(dtypes.weakint, 8))*UOp.const(dtypes.weakint, 8))+(c5%UOp.const(dtypes.weakint, 8)))+(((c2*UOp.const(dtypes.weakint, 40))+(c5//UOp.const(dtypes.weakint, 64)))*UOp.const(dtypes.weakint, 64)))+(c1*UOp.const(dtypes.weakint, 81920)))) |
| 17 | c7 = UOp(Ops.PARAM, dtypes.float.ptr(64), arg=2, src=()) |
| 18 | c8 = c7.index(c3) |
| 19 | c9 = ((((c6+(c8*UOp.const(dtypes.float, -1.0)))*(c6+(c8*UOp.const(dtypes.float, -1.0)))).reduce(c5, arg=Ops.ADD)*UOp.const(dtypes.float, 0.000390625))+UOp.const(dtypes.float, 1e-05)).sqrt().reciprocal() |
| 20 | c10 = c0.index(c3).store(c9).end(c1, c2) |
| 21 | ast = c10.sink(arg=KernelInfo()) |
| 22 | to_program(ast, renderer=Device[Device.DEFAULT].renderer) |
| 23 | |
| 24 | if __name__ == '__main__': |
| 25 | unittest.main() |
nothing calls this directly
no test coverage detected