junrushao1994 commented on a change in pull request #5718:
URL: https://github.com/apache/incubator-tvm/pull/5718#discussion_r434366562
##########
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:
Yah I got what you mean, and thank you for the clarification
@ANSHUMAN87! Totally agree with your points, but we want to unify the way we
check "FFI -> string" conversion, so that future users won't end up messing
them up. This is the reason why I made this change: After this PR, the only
places that use raw kTVMStr are RPC and C-API.
Thank you again for the comments @zhiics @ANSHUMAN87!
----------------------------------------------------------------
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]