()
| 122 | |
| 123 | |
| 124 | def test_check(): |
| 125 | a = tvm.tirx.Var("a", "int32") |
| 126 | b = tvm.tirx.Var("b", "int32") |
| 127 | c = tvm.tirx.Var("c", "int32") |
| 128 | d = tvm.tirx.Var("d", "int32") |
| 129 | |
| 130 | b_s = tvm.arith.IntervalSet(2, 3) |
| 131 | c_s = tvm.arith.IntervalSet(5, 7) |
| 132 | d_s = tvm.arith.IntervalSet(-3, -1) |
| 133 | |
| 134 | # no compare operator |
| 135 | res1 = tvm.arith.deduce_bound(a, a + b, {b: b_s}, {}) |
| 136 | assert res1.is_nothing() |
| 137 | |
| 138 | # multiple compare operators |
| 139 | res2 = tvm.arith.deduce_bound(a, (a + b > 3).astype(c.dtype) > c, {b: b_s, c: c_s}, {}) |
| 140 | assert res2.is_nothing() |
| 141 | |
| 142 | # multiple target variable |
| 143 | res2 = tvm.arith.deduce_bound(a, a * 2 - a > b, {b: b_s}, {}) |
| 144 | assert res2.is_nothing() |
| 145 | |
| 146 | |
| 147 | def test_deduce_basic(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…