From commits-return-15425-archive-asf-public=cust-asf.ponee.io@tvm.apache.org Mon Jun 15 17:34:15 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 45A4B180656 for ; Mon, 15 Jun 2020 19:34:15 +0200 (CEST) Received: (qmail 38951 invoked by uid 500); 15 Jun 2020 17:34:14 -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 38942 invoked by uid 99); 15 Jun 2020 17:34:14 -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; Mon, 15 Jun 2020 17:34:14 +0000 From: =?utf-8?q?GitBox?= To: commits@tvm.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-tvm=5D_comaniac_commented_on_a_change_in?= =?utf-8?q?_pull_request_=235797=3A_=5BMergeComposite=5D_Fix_InferType_when_?= =?utf-8?q?module_contains_Prelude?= Message-ID: <159224245454.8807.897969642192850342.asfpy@gitbox.apache.org> Date: Mon, 15 Jun 2020 17:34:14 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: comaniac commented on a change in pull request #5797: URL: https://github.com/apache/incubator-tvm/pull/5797#discussion_r440335267 ########## File path: src/relay/transforms/merge_composite.cc ########## @@ -36,22 +36,24 @@ namespace tvm { namespace relay { namespace merge_composite { -Function InferType(const Function& expr) { - auto mod = IRModule::FromExpr(expr); +Function InferType(const Function& expr, const IRModule& m) { + IRModule mod(m); + mod->Update(mod->GetGlobalVar("main"), expr); Review comment: Since now we update the original module with new transformed function, should we update the corresponding function instead of `main`? ---------------------------------------------------------------- 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