areusch commented on a change in pull request #7903:
URL: https://github.com/apache/tvm/pull/7903#discussion_r620669445



##########
File path: src/runtime/graph_executor/debug/graph_executor_debug.cc
##########
@@ -210,65 +210,42 @@ class GraphExecutorDebug : public GraphExecutor {
     return static_cast<size_t>(nodes_[index].param.num_outputs);
   }
 
-  /*!
-   * \brief Execute network to a specific node and return result.
-   *
-   * This method will do a partial run of the the graph
-   * from begining upto the index-th node and return output of index-th node.
-   * This is costly operation and suggest to use only for debug porpose.
-   *
-   * \param index: The index of the node.
-   * \return Node output array.
-   */
-  Array<NDArray> DebugGetNodeOutput(int index) {
-    ICHECK_LT(static_cast<size_t>(index), op_execs_.size());
-    Array<NDArray> results;
-
-    for (size_t i = 0; i <= static_cast<size_t>(index); i++) {
-      if (op_execs_[i]) op_execs_[i]();
-    }
-    for (size_t j = 0; j < NodeGetNumOutputs(index); j++) {
-      results.push_back(data_entry_[entry_id(index, j)].CopyTo({kDLCPU, 0}));
-    }
-    return results;
-  }
-
   /*!
    * \brief Execute next node in the network.
    *
    * This method will execute next node assuming
    * previous nodes has been executed and return output of index-th node.
    *
-   * \param index: The index of the node.
-   * \param eid The Entry id of the op.
-   * \return Node output array.
+   * \param node_ind: The index of the node.
+   * \param output_ind: The output index of this node.
+   * \return Node outputs array.
    */
-  NDArray ExecuteNextNodeGetOutput(int index, int eid) {
-    ICHECK_LT(static_cast<size_t>(index), op_execs_.size());
-    if (op_execs_[index]) op_execs_[index]();
-    return data_entry_[entry_id(index, eid)];
+  NDArray ExecuteNextNodeGetOutputs(int node_ind, int output_ind) {
+    ICHECK_LT(static_cast<size_t>(node_ind), op_execs_.size());
+    if (op_execs_[node_ind]) op_execs_[node_ind]();

Review comment:
       it would still be great to split this line and the following line into 
separate functions. we should be able to do:
   1. run node layer
   2. get layer output j
   
   as separate things




-- 
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:
[email protected]


Reply via email to