yongfeng-nv commented on a change in pull request #5367:
URL: https://github.com/apache/incubator-tvm/pull/5367#discussion_r413188821
##########
File path: src/arith/const_int_bound.cc
##########
@@ -150,10 +150,12 @@ class ConstIntBoundAnalyzer::Impl :
const PrimExprNode* op = expr.as<PrimExprNode>();
auto val = bound_->find(op);
if (val != bound_->end()) {
- CHECK(val->second->min_value == res.min_value &&
- val->second->max_value == res.max_value)
- << "Detected bound for " << expr
- << "conflicts with memorization";
+ auto everything = Everything(op->dtype);
+ CHECK(
+ (val->second->min_value == res.min_value && val->second->max_value
== res.max_value) ||
+ (val->second->min_value == everything.min_value &&
Review comment:
It is not exactly override, but assuming a partial order that limit
bound is better than inf bound. I still keep assertion for different limit
bounds, when override == false.
This change alters API semantics, but I am not sure if this behavior worth
another mode in addition to override.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]