()
| 184 | |
| 185 | |
| 186 | def test_no_solution(): |
| 187 | x = tvm.tirx.Var("x0", "int32") |
| 188 | vranges = {x: tvm.ir.Range.from_min_extent(-20, 41)} |
| 189 | problem = [-x - 4 <= -5 * x + 2, x * 4 + 5 <= x * 5] |
| 190 | |
| 191 | solution = arith.solve_linear_inequalities(problem, [x], vranges, deskew_range=True) |
| 192 | assert list(solution.dst.variables) == [] |
| 193 | [rel] = solution.dst.relations |
| 194 | ir.assert_structural_equal(rel, tirx.const(False)) |
| 195 | assert len(solution.src_to_dst) == 0 |
| 196 | assert len(solution.dst_to_src) == 0 |
| 197 | |
| 198 | solution = arith.solve_linear_inequalities(problem, [x], vranges) |
| 199 | assert len(solution.variables) == 0 |
| 200 | assert len(solution.ranges) == 0 |
| 201 | [rel] = solution.relations |
| 202 | assert not rel |
| 203 | |
| 204 | |
| 205 | def test_unbound_var_range(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…