tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@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
Date Tue, 07 Apr 2020 19:40:49 GMT
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, we will need to add a patch, by checking if the result is kStr and run this,
alternatively, use AsObjectRef<String>

----------------------------------------------------------------
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

Mime
View raw message