tqchen commented on a change in pull request #5687:
URL: https://github.com/apache/incubator-tvm/pull/5687#discussion_r434092626



##########
File path: src/runtime/graph/graph_runtime.cc
##########
@@ -418,6 +419,9 @@ PackedFunc GraphRuntime::GetFunction(const std::string& 
name,
       int in_idx = 0;
       if (args[0].type_code() == kTVMStr) {
         in_idx = this->GetInputIndex(args[0]);
+      } else if (args[0].IsObjectRef<runtime::String>()) {
+        auto str = args[0].AsObjectRef<runtime::String>();
+        in_idx = this->GetInputIndex(str);

Review comment:
       Perhaps we can introduce `static 
runtime::String::CanConvertFrom(TVMArgValue)` and `runtime::String str = 
args[0];`




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to