sunjiweiswift commented on a change in pull request #8497:
URL: https://github.com/apache/tvm/pull/8497#discussion_r678011784
##########
File path: src/runtime/graph_executor/graph_executor.cc
##########
@@ -389,6 +434,13 @@ void GraphExecutor::SetupOpExecs() {
input_dltensors_[eid].push_back(static_cast<DLTensor*>(op_args->arg_values[i].v_handle));
}
}
+ // check if op output is model output
+ if (output_node_id.count(nid) > 0) {
+ for (uint32_t index = inode.inputs.size();
+ index < inode.param.num_outputs + inode.param.num_inputs; ++index) {
+
output_dltensors_.push_back(static_cast<DLTensor*>(op_args->arg_values[index].v_handle));
Review comment:
without sort, ut will not fail.
the UT module heads":[0,0],[1,0],[3,0],[4,0],[3,0],[2,0],[5,0]"
if we want to get node[2] output index is 5, not 3, becauce the outputs_ out
of order
node 0 index 0
node 1 index 1
node 3 index 2 or 4
node 4 index 3
node 5 index 6
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]