You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/06/03 06:14:06 UTC
[GitHub] [incubator-tvm] zhiics commented on a change in pull request #5718: [Object][FFI] Introduce runtime::String::CanConvertFrom
zhiics commented on a change in pull request #5718:
URL: https://github.com/apache/incubator-tvm/pull/5718#discussion_r434329930
##########
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:
I think this is okay because `IsObjectRef` doesn't check the container type for `String`.
https://github.com/apache/incubator-tvm/blob/4347b41a5e64a2a453297b371232d6e101051b3c/include/tvm/runtime/packed_func.h#L1301
----------------------------------------------------------------
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