aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite_supported_operators.py
diff options
context:
space:
mode:
authorRickard Bolin <rickard.bolin@arm.com>2023-09-29 12:48:29 +0000
committerRickard Bolin <rickard.bolin@arm.com>2023-10-11 11:07:22 +0000
commitb37a81bfce0c7ae3092e4b3c9f69e08644b84e25 (patch)
tree88f25785f8b978cc57ad4a7b4c83e8cea84033dd /ethosu/vela/tflite_supported_operators.py
parent529b787f0321cbae1878ecb0994c60f670bc7ea1 (diff)
downloadethos-u-vela-b37a81bfce0c7ae3092e4b3c9f69e08644b84e25.tar.gz
MLBEDSW-8111: Update to TensorFlow 2.14
- Update to TensorFlow 2.14 and minimum required Python version to 3.9. - Update version pins on NumPy and FlatBuffers. - Add constraint to Offset attribute of StridedSlice operator Change-Id: I8c7122def963202e5f47e92b62be607935ed05cf 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.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ethosu/vela/tflite_supported_operators.py b/ethosu/vela/tflite_supported_operators.py
index 3dbde847..41862b6e 100644
--- a/ethosu/vela/tflite_supported_operators.py
+++ b/ethosu/vela/tflite_supported_operators.py
@@ -306,6 +306,7 @@ class TFLiteSupportedOperators:
self.specific_constraints[Op.StridedSlice].append(
TFLiteSupportedOperators.constraint_stridedslice_stride_values
)
+ self.specific_constraints[Op.StridedSlice].append(TFLiteSupportedOperators.constraint_stridedslice_offset_false)
# Pad specific checks:
self.specific_constraints[Op.Pad].append(TFLiteSupportedOperators.constraint_pad_shape)
@@ -806,6 +807,13 @@ class TFLiteSupportedOperators:
return valid, f"Op has strides values {strides.values}"
@staticmethod
+ def constraint_stridedslice_offset_false(op):
+ "Offset attribute must be False"
+ offset = op.attrs.get("offset", False)
+ valid = offset is False
+ return valid, f"Op has offset={offset}"
+
+ @staticmethod
def constraint_inputs_int32(op):
"Both Input data types must be int32"
ifm_dtype = op.ifm.dtype