[Fix][TIR] Fix tvm::arith::UnionLowerBound#14304
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
|
Could you please add a regression test? |
|
We could add a testcase to tests/python/unittest/test_arith_intset.py::test_union_lower_bound |
Already added, thanks for your suggestion. |
Already added, thanks for your suggestion |
| set_1 = tvm.arith.IntervalSet(min_value=1, max_value=pos_inf) | ||
| result = tvm.arith.int_set.union_lower_bound([set_0, set_1]) | ||
| set_2 = tvm.arith.IntervalSet(min_value=pos_inf, max_value=neg_inf) | ||
| result = tvm.arith.int_set.union_lower_bound([set_0, set_1, set_2]) |
There was a problem hiding this comment.
it is better to preserve original case and just append new cases
There was a problem hiding this comment.
code updated,thanks for your great advice!
| assert result.min_value.same_as(neg_inf) | ||
| assert result.max_value.same_as(pos_inf) | ||
| set_2 = tvm.arith.IntervalSet(min_value=pos_inf, max_value=neg_inf) | ||
| result = tvm.arith.int_set.union_lower_bound([set_0, set_2]) |
There was a problem hiding this comment.
missing final result assertions
There was a problem hiding this comment.
code updated,thanks for your great advice!
wrongtest-intellif
left a comment
There was a problem hiding this comment.
Look good to me
Hzfengsy
left a comment
There was a problem hiding this comment.
Please make the CI green and we can get it in :-)
|
@tvm-bot re-run |
Hi, CI is finished. |
The UnionLowerBound function does not take into account the condition that the empty set has a special representation [+inf, -inf].
cc @wrongtest-intellif