tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] tqchen commented on a change in pull request #5687: [Object] Unify StrMapNode and MapNode
Date Tue, 02 Jun 2020 22:35:57 GMT

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



Mime
View raw message