()
| 52 | |
| 53 | |
| 54 | def test_const_fold2(): |
| 55 | x = tvm.tirx.Var("x", "int32") |
| 56 | tmod = tvm.tirx.truncmod |
| 57 | tdiv = tvm.tirx.truncdiv |
| 58 | assert (x + 0).same_as(x) |
| 59 | assert (0 + x).same_as(x) |
| 60 | assert (x - 0).same_as(x) |
| 61 | assert tmod(x, 1).value == 0 |
| 62 | assert (x * 1).same_as(x) |
| 63 | assert (1 * x).same_as(x) |
| 64 | assert isinstance(tdiv(1, x), tvm.tirx.Div) |
| 65 | |
| 66 | |
| 67 | def test_const_fold3(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…