From commits-return-10676-archive-asf-public=cust-asf.ponee.io@tvm.apache.org Tue Apr 7 19:44:56 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 8154F180663 for ; Tue, 7 Apr 2020 21:44:56 +0200 (CEST) Received: (qmail 95719 invoked by uid 500); 7 Apr 2020 19:44:55 -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 95710 invoked by uid 99); 7 Apr 2020 19:44:55 -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; Tue, 07 Apr 2020 19:44:55 +0000 From: GitBox To: commits@tvm.apache.org Subject: [GitHub] [incubator-tvm] tqchen commented on a change in pull request #5251: [RUNTIME] Auto conversion from str to runtime::String in PackedFUnc Message-ID: <158628869579.26198.4576344822168747644.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Tue, 07 Apr 2020 19:44:55 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit tqchen commented on a change in pull request #5251: [RUNTIME] Auto conversion from str to runtime::String in PackedFUnc URL: https://github.com/apache/incubator-tvm/pull/5251#discussion_r405065312 ########## File path: include/tvm/runtime/packed_func.h ########## @@ -554,6 +512,10 @@ class TVMArgValue : public TVMPODValue_ { return std::string(value_.v_str); } } + operator tvm::runtime::String() const { + // directly use the std::string constructor for now. + return tvm::runtime::String(operator std::string()); Review comment: Ah, i see, good catch, we will need to add a patch, by checking if the result is kStr and run this, alternatively, use AsObjectRef ---------------------------------------------------------------- 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 With regards, Apache Git Services