diff options
author | Ayaan Masood <Ayaan.Masood@arm.com> | 2022-06-29 18:16:04 +0100 |
---|---|---|
committer | Ayaan Masood <Ayaan.Masood@arm.com> | 2022-06-29 18:16:04 +0100 |
commit | 25f48dd70aebeecd490de71eed3d4f7fbad1b121 (patch) | |
tree | 1cf03f59c8160a00a68faf0ffa62a9cd04a5c5b2 /ethosu/vela/tflite_model_semantic.py | |
parent | 4965faee41300393cd8d74da4b399fa4c4ee9030 (diff) | |
download | ethos-u-vela-25f48dd70aebeecd490de71eed3d4f7fbad1b121.tar.gz |
MLBEDSW-6314 Static optimisation for quantise OP
*Quantise op becomes constant if input is known at compile time
*Quantised values calculated if input of op is const and float
*Const inputs to quant op that are int are requantized
Change-Id: Ic94a72a392af709fe6a640d7dacbb5dc2334f16f
Signed-off-by: Ayaan Masood <Ayaan.Masood@arm.com>
Diffstat (limited to 'ethosu/vela/tflite_model_semantic.py')
-rw-r--r-- | ethosu/vela/tflite_model_semantic.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ethosu/vela/tflite_model_semantic.py b/ethosu/vela/tflite_model_semantic.py index ee66d4cc..9408e0ce 100644 --- a/ethosu/vela/tflite_model_semantic.py +++ b/ethosu/vela/tflite_model_semantic.py @@ -216,7 +216,12 @@ class TFLiteSemantic: TFLiteSemantic.constraint_tens_quant_none_check, TFLiteSemantic.constraint_tens_quant_scale, TFLiteSemantic.constraint_quant_scale_inf, - ] + ], + Op.Quantize: [ + TFLiteSemantic.constraint_tens_no_dynamic, + TFLiteSemantic.constraint_tens_output_scalar, + TFLiteSemantic.constraint_tens_input_scalar, + ], } return generic_constraints_exclude_list |