diff options
Diffstat (limited to 'ethosu/vela/tflite_supported_operators.py')
-rw-r--r-- | ethosu/vela/tflite_supported_operators.py | 8 |
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 |