dchauhan-arm commented on a change in pull request #9508:
URL: https://github.com/apache/tvm/pull/9508#discussion_r752086478
##########
File path: tests/python/contrib/test_ethosu/test_legalize.py
##########
@@ -221,135 +221,135 @@ def get_shape_expr(in_expr, out_expr):
return shape
+def compute_ofm_shape(ifm_shape, padding, kernel_shape, strides, dilation):
+ if padding.lower() == "valid":
+ h = math.ceil((ifm_shape[1] - (kernel_shape[0] - 1) * dilation[0]) /
strides[0])
+ w = math.ceil((ifm_shape[2] - (kernel_shape[1] - 1) * dilation[1]) /
strides[1])
+ if padding.lower() == "same":
+ h = math.ceil(ifm_shape[1] / strides[0])
+ w = math.ceil(ifm_shape[2] / strides[1])
+ ofm_shape = [ifm_shape[0], h, w, kernel_shape[3]]
+ return ofm_shape
Review comment:
The specifics of not using compute_ofm_shape from infra.py escape me at
the moment, but I believe it was to do with an assertion failing. Let me see if
I can rectify it so I don't have to use the exact same function minus the
assertion.
--
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]