You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/10/27 23:54:18 UTC

[GitHub] [incubator-tvm] comaniac opened a new pull request #6777: [BYOC] Configurable optimize pass for PartitionGraph

comaniac opened a new pull request #6777:
URL: https://github.com/apache/incubator-tvm/pull/6777


   Currently, `PartitionGraph` implicitly invokes `relay.ext.*.optimize` pass for each partitioned Relay function, but this is hard to maintain and trace. This PR adds an optional argument to `PartitionGraph` pass to make it explicit. 
   
   cc @zhiics @masahi @lhutton1 


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



[GitHub] [incubator-tvm] comaniac commented on a change in pull request #6777: [BYOC] Configurable optimize pass for PartitionGraph

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #6777:
URL: https://github.com/apache/incubator-tvm/pull/6777#discussion_r519014138



##########
File path: python/tvm/relay/op/contrib/arm_compute_lib.py
##########
@@ -62,7 +72,7 @@ def partition_for_arm_compute_lib(mod, params=None):
             transform.InferType(),
             transform.MergeComposite(arm_compute_lib_pattern_table()),
             transform.AnnotateTarget("arm_compute_lib"),
-            transform.PartitionGraph(),
+            transform.PartitionGraph(optimize),

Review comment:
       This pass applies to each partitioned function, so it has to be called after the partitioned function has been created. See #6068




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



[GitHub] [incubator-tvm] comaniac commented on a change in pull request #6777: [BYOC] Configurable optimize pass for PartitionGraph

Posted by GitBox <gi...@apache.org>.
comaniac commented on a change in pull request #6777:
URL: https://github.com/apache/incubator-tvm/pull/6777#discussion_r519061574



##########
File path: python/tvm/relay/op/contrib/arm_compute_lib.py
##########
@@ -62,7 +72,7 @@ def partition_for_arm_compute_lib(mod, params=None):
             transform.InferType(),
             transform.MergeComposite(arm_compute_lib_pattern_table()),
             transform.AnnotateTarget("arm_compute_lib"),
-            transform.PartitionGraph(),
+            transform.PartitionGraph(optimize),

Review comment:
       As being said in that PR, we can definitely do that. In fact we are planning an RFC right now, so depending on one the RFC, we probably don't need this PR anymore.




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



[GitHub] [incubator-tvm] manupa-arm commented on a change in pull request #6777: [BYOC] Configurable optimize pass for PartitionGraph

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #6777:
URL: https://github.com/apache/incubator-tvm/pull/6777#discussion_r519063704



##########
File path: python/tvm/relay/op/contrib/arm_compute_lib.py
##########
@@ -62,7 +72,7 @@ def partition_for_arm_compute_lib(mod, params=None):
             transform.InferType(),
             transform.MergeComposite(arm_compute_lib_pattern_table()),
             transform.AnnotateTarget("arm_compute_lib"),
-            transform.PartitionGraph(),
+            transform.PartitionGraph(optimize),

Review comment:
       OK, sounds good :). I think PartitionGraph should just perform partitioning unless its really unavoidable to perform the needed post-processing after the pass.




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



[GitHub] [incubator-tvm] manupa-arm commented on a change in pull request #6777: [BYOC] Configurable optimize pass for PartitionGraph

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #6777:
URL: https://github.com/apache/incubator-tvm/pull/6777#discussion_r518675923



##########
File path: python/tvm/relay/op/contrib/arm_compute_lib.py
##########
@@ -62,7 +72,7 @@ def partition_for_arm_compute_lib(mod, params=None):
             transform.InferType(),
             transform.MergeComposite(arm_compute_lib_pattern_table()),
             transform.AnnotateTarget("arm_compute_lib"),
-            transform.PartitionGraph(),
+            transform.PartitionGraph(optimize),

Review comment:
       Why cant we just run the optimize pass before partition graph here ? Is there a reason why it has to be inside PartitionGraph() ?




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



[GitHub] [incubator-tvm] manupa-arm commented on a change in pull request #6777: [BYOC] Configurable optimize pass for PartitionGraph

Posted by GitBox <gi...@apache.org>.
manupa-arm commented on a change in pull request #6777:
URL: https://github.com/apache/incubator-tvm/pull/6777#discussion_r519057683



##########
File path: python/tvm/relay/op/contrib/arm_compute_lib.py
##########
@@ -62,7 +72,7 @@ def partition_for_arm_compute_lib(mod, params=None):
             transform.InferType(),
             transform.MergeComposite(arm_compute_lib_pattern_table()),
             transform.AnnotateTarget("arm_compute_lib"),
-            transform.PartitionGraph(),
+            transform.PartitionGraph(optimize),

Review comment:
       Hmm, then why not after PartitionGraph ? (using kCompiler as a filter) ?




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