File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -273,12 +273,9 @@ def build_rescale(
273273 import serializer .tosa_serializer as ts # type: ignore
274274 import tosa .Op as TosaOp # type: ignore
275275
276- # Check if scale32 mode is used for given output element type
277- is_scale32 = output_type == ts .DType .INT8
278- scale_width = 32 if is_scale32 else 16
279276 input_name = input_node .name
280277
281- multipliers , shifts = compute_multiplier_and_shift (scale , scale_width )
278+ multipliers , shifts = compute_multiplier_and_shift (scale , 32 )
282279 rescale_inputs = create_const_ops_for_rescale (
283280 tosa_fb ,
284281 input_node .dtype ,
@@ -291,7 +288,7 @@ def build_rescale(
291288 )
292289 attr_rescale = ts .TosaSerializerAttribute ()
293290 attr_rescale .RescaleAttribute (
294- scale32 = is_scale32 ,
291+ scale32 = True ,
295292 rounding_mode = rounding_mode ,
296293 per_channel = per_channel ,
297294 input_unsigned = False ,
You can’t perform that action at this time.
0 commit comments