From commits-return-14510-archive-asf-public=cust-asf.ponee.io@tvm.apache.org Wed Jun 3 05:15:29 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 A106118064C for ; Wed, 3 Jun 2020 07:15:29 +0200 (CEST) Received: (qmail 80652 invoked by uid 500); 3 Jun 2020 05:15:29 -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 80641 invoked by uid 99); 3 Jun 2020 05:15:29 -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, 03 Jun 2020 05:15:28 +0000 From: =?utf-8?q?GitBox?= To: commits@tvm.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bincubator-tvm=5D_ANSHUMAN87_commented_on_a_change_?= =?utf-8?q?in_pull_request_=235718=3A_=5BObject=5D=5BFFI=5D_Introduce_runtim?= =?utf-8?q?e=3A=3AString=3A=3ACanConvertFrom?= Message-ID: <159116132890.10999.15715593691558296003.asfpy@gitbox.apache.org> Date: Wed, 03 Jun 2020 05:15:28 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit In-Reply-To: References: ANSHUMAN87 commented on a change in pull request #5718: URL: https://github.com/apache/incubator-tvm/pull/5718#discussion_r434310738 ########## File path: src/ir/attrs.cc ########## @@ -37,7 +37,7 @@ void DictAttrsNode::InitByPackedArgs(const runtime::TVMArgs& args, bool allow_un runtime::TVMArgValue val = args[i + 1]; if (val.IsObjectRef()) { dict.Set(key, val.operator ObjectRef()); - } else if (val.type_code() == kTVMStr) { + } else if (String::CanConvertFrom(val)) { Review comment: > Thank you for your question! Hmmmm but I am not sure I understand if correctly. Just to confirm, "The first if condition", are you referring to "val.type_code() == kTVMStr" in `CanConvertFrom`? Thank you! Sorry for confusion. The first if condition --> if (val.IsObjectRef()) might be true always for String objref, so maybe the condition inside String::CanConvertFrom(val) will not reach. ---------------------------------------------------------------- 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