Skip to content

Conversation

@Biubiubiu12
Copy link
Contributor

@Biubiubiu12 Biubiubiu12 commented Mar 15, 2023

The UnionLowerBound function does not take into account the condition that the empty set has a special representation [+inf, -inf].

cc @wrongtest-intellif

@tvm-bot
Copy link
Collaborator

tvm-bot commented Mar 15, 2023

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

@Biubiubiu12 Biubiubiu12 changed the title [Bugfix][TensorIR] Fix tvm::arith::UnionLowerBound [Fix][TIR] Fix tvm::arith::UnionLowerBound Mar 15, 2023
@Hzfengsy
Copy link
Member

Could you please add a regression test?

@wrongtest-intellif
Copy link
Contributor

We could add a testcase to tests/python/unittest/test_arith_intset.py::test_union_lower_bound

@Biubiubiu12
Copy link
Contributor Author

Could you please add a regression test?

Already added, thanks for your suggestion.

@Biubiubiu12
Copy link
Contributor Author

We could add a testcase to tests/python/unittest/test_arith_intset.py::test_union_lower_bound

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])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is better to preserve original case and just append new cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing final result assertions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code updated,thanks for your great advice!

@Biubiubiu12 Biubiubiu12 deleted the biubiu_dev branch March 16, 2023 02:40
@Biubiubiu12 Biubiubiu12 reopened this Mar 16, 2023
Copy link
Contributor

@wrongtest-intellif wrongtest-intellif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good to me

Copy link
Member

@Hzfengsy Hzfengsy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the CI green and we can get it in :-)

@Biubiubiu12
Copy link
Contributor Author

Biubiubiu12 commented Mar 17, 2023

@tvm-bot re-run

@Biubiubiu12
Copy link
Contributor Author

Please make the CI green and we can get it in :-)

Hi, CI is finished.

@masahi masahi merged commit fe3fa9d into apache:main Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants