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/08/31 23:36:50 UTC
[GitHub] [incubator-tvm] comaniac commented on a change in pull request #6368: [BYOC][JSON] Support input nodes with multiple entries
comaniac commented on a change in pull request #6368:
URL: https://github.com/apache/incubator-tvm/pull/6368#discussion_r480473880
##########
File path: src/runtime/contrib/json/json_runtime.h
##########
@@ -183,7 +183,10 @@ class JSONRuntimeBase : public ModuleNode {
uint32_t nid = input_nodes_[i];
std::string name = nodes_[nid].name_;
if (nodes_[nid].op_type_ == "input") {
- input_var_idx_.push_back(nid);
+ CHECK_EQ(nodes_[nid].GetOpShape().size(), nodes_[nid].GetOpDataType().size());
+ for (size_t j = 0; j < nodes_[nid].GetOpShape().size(); ++j) {
+ input_var_idx_.push_back(EntryID(nid, j));
Review comment:
By doing so, `input_var_idx_` is not keeping index but entry ID. I'd suggest renaming it to be clearer.
----------------------------------------------------------------
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