aboutsummaryrefslogtreecommitdiff
path: root/ethosu
diff options
context:
space:
mode:
authorFredrik Svedberg <fredrik.svedberg@arm.com>2020-05-04 15:40:04 +0200
committerTim Hall <tim.hall@arm.com>2020-06-18 17:53:52 +0100
commitc91dd1cb65c63c792c1c973a1e200cd8e484d8a2 (patch)
treec8e5fc31655aa1147ae3c8877f7fdbba03f7434b /ethosu
parent3c678298241eb7c3e216bc9f79125ba06c216ec8 (diff)
downloadethos-u-vela-c91dd1cb65c63c792c1c973a1e200cd8e484d8a2.tar.gz
MLBEDSW-819: int16 changes for advanced add/sub
Updated scaling for advanced add/sub. Change-Id: I89eaff0cf5c33dcc94e8a3eeed4187771e0d8d63 Signed-off-by: Fredrik Svedberg <fredrik.svedberg@arm.com>
Diffstat (limited to 'ethosu')
-rw-r--r--ethosu/vela/scaling.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethosu/vela/scaling.py b/ethosu/vela/scaling.py
index 785cddc6..ce0259a5 100644
--- a/ethosu/vela/scaling.py
+++ b/ethosu/vela/scaling.py
@@ -88,7 +88,7 @@ def advanced_elementwise_add_sub_scale(input1_scale, input2_scale, output_scale,
# Always scale the smaller of the input scales
max_input_scale = max(input1_scale, input2_scale)
min_input_scale = min(input1_scale, input2_scale)
- input_shift = 20 if bitdepth == 8 else 14
+ input_shift = 20 if bitdepth == 8 else 15
op_to_scale = OperandToScale.OPa if input1_scale < input2_scale else OperandToScale.OPb
input1_rescale, _, out_scale, out_shift = simplified_elementwise_add_sub_scale(