tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] manupa-arm commented on a change in pull request #5493: [REFACTOR][BOYC] Non recursive partitioning
Date Fri, 01 May 2020 12:34:22 GMT

manupa-arm commented on a change in pull request #5493:
URL: https://github.com/apache/incubator-tvm/pull/5493#discussion_r418522956



##########
File path: src/relay/transforms/partition_graph.cc
##########
@@ -470,115 +353,82 @@ class Partitioner : public ExprMutator {
   Expr GetFunctionOutput(AnnotatedRegion region, const Expr& end_arg) {
     Expr arg = Downcast<Call>(end_arg)->args[0];
     // Function has one output.
-    if (region_return_indices_[region].size() == 1) {
-      return region_function_calls[region];
+    if (region_func_meta_[region].out_expr_indices.size() == 1) {
+      return region_func_meta_[region].func_call;
     }
+
     // Function has multiple outputs.
     // Use already made TupleGetItem.
-    if (region_return_tuplegetitem_.count(region) &&
-        region_return_tuplegetitem_[region].count(arg)) {
-      return region_return_tuplegetitem_[region][arg];
+    if (region_func_meta_[region].out_expr_indices.count(arg) &&
+        region_func_meta_[region].out_expr_indices[arg].second.defined()) {

Review comment:
       If a certain output (index) has multiple consumers, we dont want to insert multiple
TupleGetItem nodes I suppose. Thus, we need to cache them.




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



Mime
View raw message