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



##########
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:
       This is kind of verbose that we have to check kTVMStr and Object 
runtime::String...Is there any better solution?




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