diff options
author | William Isaksson <william.isaksson@arm.com> | 2023-11-22 22:27:58 +0100 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2023-12-20 08:46:09 +0000 |
commit | f4a511ffe7cd6c77e2effcbdf0843b2ef89d8df4 (patch) | |
tree | 9edfe95c8fa72bf8178e478a45cd69a8dc0e8ee4 /ethosu/vela/tflite_supported_operators.py | |
parent | d2e03c61b028f9f84fd61812ea8905bf68f482e3 (diff) | |
download | ethos-u-vela-f4a511ffe7cd6c77e2effcbdf0843b2ef89d8df4.tar.gz |
MLBEDSW-8157: Update to TensorFlow 2.15
Updates to TensorFlow 2.15. No StableHLO operators were added to Vela since these are subject to change and have almost no runtime support.
- FlatBuffers version was unchanged.
Change-Id: I9a506a2dcc2e0bc2498742e857bbb6d69b19ac1b
Signed-off-by: William Isaksson <william.isaksson@arm.com>
Signed-off-by: Rickard Bolin <rickard.bolin@arm.com>
Diffstat (limited to 'ethosu/vela/tflite_supported_operators.py')
-rw-r--r-- | ethosu/vela/tflite_supported_operators.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py index e5686f4c..ada2136a 100644 --- a/ethosu/vela/tflite_supported_operators.py +++ b/ethosu/vela/tflite_supported_operators.py @@ -58,6 +58,7 @@ class TFLiteSupportedOperators: depthwise_convolution_ops = set((Op.DepthwiseConv2DBias,)) transpose_convolution_ops = set((Op.Conv2DBackpropInput,)) convolution_like_ops = convolution_ops | depthwise_convolution_ops | transpose_convolution_ops + conv_depth_fc_op = convolution_ops | depthwise_convolution_ops | set((Op.FullyConnected,)) max_pooling_ops = Op.op_set(Op.is_maxpool_op) avg_pooling_ops = Op.op_set(Op.is_avgpool_op) pooling_ops = set((Op.ReduceSum,)) | max_pooling_ops | avg_pooling_ops @@ -238,7 +239,8 @@ class TFLiteSupportedOperators: self.specific_constraints[op_type].append(TFLiteSupportedOperators.constraint_bias_shape) self.specific_constraints[op_type].append(TFLiteSupportedOperators.constraint_bias_type) self.specific_constraints[op_type].append(TFLiteSupportedOperators.constraint_bias_40bit) - + for op_type in TFLiteSupportedOperators.conv_depth_fc_op: + self.specific_constraints[op_type].append(TFLiteSupportedOperators.constraint_no_quantized_bias_type) # Transpose Conv specific checks: for op_type in TFLiteSupportedOperators.transpose_convolution_ops: self.specific_constraints[op_type].append(TFLiteSupportedOperators.constraint_tconv_stride) @@ -532,6 +534,12 @@ class TFLiteSupportedOperators: return valid, f"Tensor '{bias.name}' has values larger than 40-bits" return True, "Op has no bias tensor, or it fits in 40-bit" + def constraint_no_quantized_bias_type(op): + "Attribute quantized_bias_type must not be set" + quantized_bias_type = op.attrs.get("quantized_bias_type", False) + valid = quantized_bias_type == 0 + return valid, f"Op has quantized_bias_type={quantized_bias_type}" + @staticmethod def constraint_batch_size(op): "IFM Tensor batch size must be 1" |