ANSHUMAN87 commented on a change in pull request #5718:
URL: https://github.com/apache/incubator-tvm/pull/5718#discussion_r434311351



##########
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<ObjectRef>()) {
       dict.Set(key, val.operator ObjectRef());
-    } else if (val.type_code() == kTVMStr) {
+    } else if (String::CanConvertFrom(val)) {

Review comment:
       > The Python frontend is still able to pass `runtime::String` back to 
C++ via packed function. One case I found in our testcases is: 
https://github.com/apache/incubator-tvm/pull/5687/files#diff-5243f3909dfa484d85d3d8471f259169R422-R424
   
   
   I think that may be because of implicit conversion of String(Overloaded) to 
std::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:
[email protected]


Reply via email to