From commits-return-11927-archive-asf-public=cust-asf.ponee.io@tvm.apache.org Wed Apr 22 17:33:16 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 72E17180181 for ; Wed, 22 Apr 2020 19:33:16 +0200 (CEST) Received: (qmail 70597 invoked by uid 500); 22 Apr 2020 17:33:15 -0000 Mailing-List: contact commits-help@tvm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tvm.apache.org Delivered-To: mailing list commits@tvm.apache.org Received: (qmail 70588 invoked by uid 99); 22 Apr 2020 17:33:15 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2020 17:33:15 +0000 From: =?utf-8?q?GitBox?= To: commits@tvm.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-tvm=5D_hzfan_commented_on_a_change_in_pu?= =?utf-8?q?ll_request_=235367=3A_Improve_IntervalSet=27s_floormod?= Message-ID: <158757679580.3807.2372137162234028290.asfpy@gitbox.apache.org> Date: Wed, 22 Apr 2020 17:33:15 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: hzfan commented on a change in pull request #5367: URL: https://github.com/apache/incubator-tvm/pull/5367#discussion_r413175611 ########## File path: src/arith/const_int_bound.cc ########## @@ -150,10 +150,12 @@ class ConstIntBoundAnalyzer::Impl : const PrimExprNode* op = expr.as(); 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: I guess this is for the case where `override == true`, right? If so, what about make it explicit and just checks if override is true? Or can we clear the whole memo map when updating with override? ########## File path: src/arith/int_set.cc ########## @@ -518,7 +533,14 @@ class IntervalSetEvaluator : // whether set is exactly single point that equals value. bool MatchPoint(const IntervalSet& set, const PrimExpr& value) const { - return set->min_value.same_as(value) && set->max_value.same_as(value); + if (set->min_value.same_as(value) && set->max_value.same_as(value)) { Review comment: Can we reuse `CanProve` here to check if `set->min_value == value && set->max_value == value`? ---------------------------------------------------------------- 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: users@infra.apache.org