Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TVM][ARITH] Enhance BoundDeducer #2794

Closed
derisavi opened this issue Mar 12, 2019 · 0 comments · Fixed by #2795
Closed

[TVM][ARITH] Enhance BoundDeducer #2794

derisavi opened this issue Mar 12, 2019 · 0 comments · Fixed by #2795

Comments

@derisavi
Copy link
Contributor

Consider the following reduced testcase:

import tvm

a = tvm.var('a')
b = tvm.var('b')
b_s = tvm.arith.intset_interval(2, 3)

print(tvm.arith.DeduceBound(a, b < a, {b: b_s}, {}))
print(tvm.arith.DeduceBound(a, a > b, {b: b_s}, {}))

The output is:

interval-set[pos_inf, neg_inf]
interval-set[(b + 1), pos_inf]

The expression in the two cases are mathematically equivalent, i.e., a > b, but because TVM expects the part of the expression that contains the target var (i.e., a) to be on the lhs, it cannot handle the first DeduceBound properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant