icemelon9 commented on a change in pull request #5350: [TOPI-ARM] Do not alter 
layout if layout is NHWC
URL: https://github.com/apache/incubator-tvm/pull/5350#discussion_r410347031
 
 

 ##########
 File path: topi/python/topi/arm_cpu/conv2d_alter_op.py
 ##########
 @@ -59,6 +59,10 @@ def _alter_conv2d_layout(attrs, inputs, tinfos, out_type):
     data, kernel = tinfos
     out_dtype = out_type.dtype
 
+    # We only perform layout alteration for NCHW data layout.
+    if data_layout == "NHWC":
+        return None
 
 Review comment:
   @anijain2305 I don't understand why we need this? If the data_layout is 
"NHWC", it should not use the topi template for "NCHW". So it won't perform 
layout alteration.

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