diff options
author | Dwight Lidman <dwight.lidman@arm.com> | 2021-04-28 14:42:22 +0200 |
---|---|---|
committer | Dwight Lidman <dwight.lidman@arm.com> | 2021-05-04 11:37:59 +0200 |
commit | a0b8d5f1bc32092cb85df07fb68e5582d01def32 (patch) | |
tree | 67754b8fc1ef34dc50aa51331171a745fc1d6aac /ethosu | |
parent | 8244ce0e5c2ca8e0bc788dea6fea524f7eae7b59 (diff) | |
download | ethos-u-vela-a0b8d5f1bc32092cb85df07fb68e5582d01def32.tar.gz |
MLBEDSW-4429: elementwise_broadcast output diff
This commit fixes a regression caused by a recent
commit where io_ranges and elementwise_broadcast
were failing with off-by-one errors.
The culprit was the incorrect usage of NATURAL
rounding in cases of elementwise ADD and SUB
where the input and output scales were equal and
advanced scaling was not used.
Signed-off-by: Dwight Lidman <dwight.lidman@arm.com>
Change-Id: I35d56298e911a4d1bbca7d201bcde6044c8a5490
Diffstat (limited to 'ethosu')
-rw-r--r-- | ethosu/vela/register_command_stream_generator.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ethosu/vela/register_command_stream_generator.py b/ethosu/vela/register_command_stream_generator.py index 3b552e09..6db9fe38 100644 --- a/ethosu/vela/register_command_stream_generator.py +++ b/ethosu/vela/register_command_stream_generator.py @@ -744,8 +744,6 @@ def generate_scaling_for_elementwise(emit: CommandStreamEmitter, npu_op: NpuElem # the following we know that double rounding will have no effect for advanced scaling # no matter the input, so we can safely use simplified scaling with double rounding disabled. use_advanced_scaling = int(ofm_scale) & 0xFFF != 0 - if not use_advanced_scaling: - npu_op.rounding_mode = NpuRoundingMode.NATURAL else: use_advanced_scaling = True if use_advanced_scaling: |