merrymercy commented on a change in pull request #7156:
URL: https://github.com/apache/tvm/pull/7156#discussion_r548456207



##########
File path: python/tvm/auto_scheduler/relay_integration.py
##########
@@ -126,6 +126,9 @@ def extract_tasks(
                 target=target,
                 target_host=target_host,
                 hardware_params=hardware_params,
+                # When auto scheduler is used in end to end network, try to 
apply layout rewrite
+                # to improve the overall performance
+                
layout_rewrite_option=LayoutRewriteOption.REWRITE_FOR_PRE_TRANSFORMED

Review comment:
       We can set layout rewrite options according  to the target.
   For cpu/mali, we can use `REWRITE_FOR_PRE_TRANSFORMED`. For cuda, we can use 
`NO_REWRITE`.
   
   We can create a common utility function to reuse these lines.
   
https://github.com/apache/tvm/blob/0b2ab56705a1c26aef402d1c0d48a887fc76dbd3/python/tvm/auto_scheduler/relay_integration.py#L262-L268
   
   




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