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



##########
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:
       We already overloaded operator T, just need to check the type. e.g. 
operator String() works fine now.




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