ekalda commented on a change in pull request #10251:
URL: https://github.com/apache/tvm/pull/10251#discussion_r807849609
##########
File path: python/tvm/relay/backend/contrib/ethosu/legalize.py
##########
@@ -1216,7 +1216,7 @@ def callback(
)
else:
weight_scale = 1 / (filter_height * filter_width)
- weight_values = np.ones([out_channels, filter_height,
filter_width, in_channels])
+ weight_values = np.ones([out_channels, filter_height,
filter_width, 1])
Review comment:
This is a bug in the mean implementation that I discovered by
accident... Since depthwise convolution doesn't contract along the channels
axis, one of the dimensions of the 4D weights has to be 1, so e.g. for the (1,
8, 16, 16) IFM it was creating 32 768 values instead of the necessary 2048, the
reason we got away with it so far is that the array got flattened and then
DivideConstants pass bluntly read only the first 2048 values (it's a tensor of
ones, so there was no problem with the output values mismatching either).
--
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]