manupa-arm commented on a change in pull request #5320: [BYOC] Prevent 
duplicate outputs in subgraph Tuple
URL: https://github.com/apache/incubator-tvm/pull/5320#discussion_r408996042
 
 

 ##########
 File path: src/relay/transforms/partition_graph.cc
 ##########
 @@ -456,18 +370,111 @@ class Partitioner : public ExprMutator {
   }
 
   /*!
-   * \brief Get the index of the return(output);
-   * this is to be used as tuplegetitem idx
+   * \brief This function is called first time that we encounter a compiler_end
+   * node to create the function for the subgraph.
    */
-  int GetRetIdx(AnnotatedRegion sg, const Expr& arg) {
-    int idx = 0;
-    for (auto arg_ : sg->GetOutputs()) {
-      if (arg == arg_) {
-        return idx;
+  void CreateFunction(AnnotatedRegion region, const CallNode* call) {
 
 Review comment:
   So the fan-out nodes need to have a single annotation per output, because 
when MCR works, it may be the case one fan-out path be merged and other output 
remains as a output.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to