From c91dd1cb65c63c792c1c973a1e200cd8e484d8a2 Mon Sep 17 00:00:00 2001 From: Fredrik Svedberg Date: Mon, 4 May 2020 15:40:04 +0200 Subject: MLBEDSW-819: int16 changes for advanced add/sub Updated scaling for advanced add/sub. Change-Id: I89eaff0cf5c33dcc94e8a3eeed4187771e0d8d63 Signed-off-by: Fredrik Svedberg --- ethosu/vela/scaling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethosu/vela') 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( -- cgit v1.2.1