sunjiweiswift commented on a change in pull request #8497:
URL: https://github.com/apache/tvm/pull/8497#discussion_r677951747
##########
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:
I think it is reasonable.
for example arg_nodes:[3,1,2,0]
set_input(0)->node[3]
set_input(1)->node[1]
set_input(2)->node[2]
set_input(3)->node[0]
ref:tvm/tests/python/relay/test_analysis_get_calibration_data.py::test_simple_graph
if sort the output_node_,the ut will fail
--
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]