aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Alfven <johan.alfven@arm.com>2024-02-08 15:05:23 +0100
committerJohan Alfven <johan.alfven@arm.com>2024-02-09 07:40:07 +0100
commit336830865beea9fc5bec21a53397de5241485763 (patch)
treeee6e49dca7fe4de3e1aa2fcc81ae922c6e0dfadb
parent646314ef1ee268cb972f3c918a49bff85748a332 (diff)
downloadethos-u-vela-336830865beea9fc5bec21a53397de5241485763.tar.gz
MLBEDSW-8674: int16 VectorProduct should use Natural rounding3.11.0.rc1
- Fixed output diff for FullyConnect int16 - Problem was that wrong rounding mode was used - Reference uses Natural rounding for FullyConnect int16 Change-Id: I209313b6f89fed01678a448a935d5f6904b41057 Signed-off-by: Johan Alfven <johan.alfven@arm.com>
-rw-r--r--ethosu/vela/high_level_command_to_npu_op.py3
1 files changed, 2 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 06d91a6..52d0718 100644
--- a/ethosu/vela/high_level_command_to_npu_op.py
+++ b/ethosu/vela/high_level_command_to_npu_op.py
@@ -144,7 +144,8 @@ def get_rounding_mode(op: Operation, fused_quantize: bool) -> NpuRoundingMode:
if op.type.is_resize_op():
rounding_mode = NpuRoundingMode.NATURAL
elif (
- op.original_type.npu_block_type in (NpuBlockType.ConvolutionMxN, NpuBlockType.ConvolutionDepthWise)
+ op.original_type.npu_block_type
+ in (NpuBlockType.ConvolutionMxN, NpuBlockType.ConvolutionDepthWise, NpuBlockType.VectorProduct)
and op.ifm.dtype == DataType.int16
):
rounding_mode = NpuRoundingMode.NATURAL