aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Alfven <johan.alfven@arm.com>2023-11-06 11:52:56 +0100
committerJohan Alfven <johan.alfven@arm.com>2023-11-06 17:11:44 +0100
commit4bf0cdf58416edc030ae7507ace95224785e4aa8 (patch)
tree6ebd609136a28a10ba9c448b7d93ad4ac83c7270
parent199e8e66ba3d959fd0f584683e5b1c1fda77ce6b (diff)
downloadethos-u-vela-4bf0cdf58416edc030ae7507ace95224785e4aa8.tar.gz
MLBEDSW-8261: Fix regression on AvgPool
- When adding extended stride support for CONV_2D a regression was introduced for AvgPool causing an output diff for a particular test case. - The reason was that the logic for forcing the zero point to zero when generating the cmd stream did not have a check for explicit padding. - Updated logic to also include check for explicit padding. Change-Id: Iee4893a83a05279e592fe230f4d66d9c9ddb3e05 Signed-off-by: Johan Alfven <johan.alfven@arm.com>
-rw-r--r--ethosu/vela/high_level_command_to_npu_op.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/high_level_command_to_npu_op.py b/ethosu/vela/high_level_command_to_npu_op.py
index 4384f2c..5e9dffa 100644
--- a/ethosu/vela/high_level_command_to_npu_op.py
+++ b/ethosu/vela/high_level_command_to_npu_op.py
@@ -311,7 +311,7 @@ def use_zero_point_0(ps, tens: Tensor, is_ifm_tensor: bool) -> bool:
if (
ps.primary_op.original_type == Op.AvgPool
and ps.primary_op.type == Op.Conv2DBias
- and ps.primary_op.attrs.get("padding", None) == Padding.VALID
+ and ps.primary_op.attrs.get("padding", None) in (Padding.EXPLICIT, Padding.VALID)
):
# Force zero point to 0 for AveragePool operators converted to a Conv2DBias with rounding away from
# zero.