ashutosh-arm commented on a change in pull request #9682:
URL: https://github.com/apache/tvm/pull/9682#discussion_r766755054



##########
File path: tests/python/contrib/test_cmsisnn/test_pooling.py
##########
@@ -45,10 +45,9 @@
 def make_model(pool_op, shape, pool_size, strides, padding, dtype, scale, 
zero_point, relu_type):
     """Return a model and any parameters it may have"""
     op = relay.var("input", shape=shape, dtype=dtype)
-    pad_ = (0, 0, 0, 0)
-    if padding == "SAME":
-        dilation = (1, 1)
-        pad_ = get_same_padding((shape[1], shape[2]), pool_size, dilation, 
strides)
+    dilation = (1, 1)
+    pad_, result = get_padding((shape[1], shape[2]), pool_size, dilation, 
strides, padding)
+    if result:
         op = relay.nn.pad(
             op,
             pad_width=[(0, 0), (pad_[0], pad_[2]), (pad_[1], pad_[3]), (0, 0)],

Review comment:
       That has troubled me as well at the time of implementing it :)
   In CMSIS-NN, its only used for calculating the appropriate start, end for 
the Pooling kernel. I think this should work either way. I will try it out 
without the preceding padding op.




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to