diff options
author | Rickard Bolin <rickard.bolin@arm.com> | 2023-09-29 12:48:29 +0000 |
---|---|---|
committer | Rickard Bolin <rickard.bolin@arm.com> | 2023-10-11 11:07:22 +0000 |
commit | b37a81bfce0c7ae3092e4b3c9f69e08644b84e25 (patch) | |
tree | 88f25785f8b978cc57ad4a7b4c83e8cea84033dd /ethosu/vela/tflite/Operator.py | |
parent | 529b787f0321cbae1878ecb0994c60f670bc7ea1 (diff) | |
download | ethos-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/Operator.py')
-rw-r--r-- | ethosu/vela/tflite/Operator.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/ethosu/vela/tflite/Operator.py b/ethosu/vela/tflite/Operator.py index 2af3f8ce..23d787b3 100644 --- a/ethosu/vela/tflite/Operator.py +++ b/ethosu/vela/tflite/Operator.py @@ -194,7 +194,21 @@ class Operator(object): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20)) return o == 0 -def OperatorStart(builder): builder.StartObject(9) + # Operator + def LargeCustomOptionsOffset(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(22)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) + return 0 + + # Operator + def LargeCustomOptionsSize(self): + o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(24)) + if o != 0: + return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos) + return 0 + +def OperatorStart(builder): builder.StartObject(11) def Start(builder): return OperatorStart(builder) def OperatorAddOpcodeIndex(builder, opcodeIndex): builder.PrependUint32Slot(0, opcodeIndex, 0) @@ -239,6 +253,12 @@ def AddIntermediates(builder, intermediates): def OperatorStartIntermediatesVector(builder, numElems): return builder.StartVector(4, numElems, 4) def StartIntermediatesVector(builder, numElems): return OperatorStartIntermediatesVector(builder, numElems) +def OperatorAddLargeCustomOptionsOffset(builder, largeCustomOptionsOffset): builder.PrependUint64Slot(9, largeCustomOptionsOffset, 0) +def AddLargeCustomOptionsOffset(builder, largeCustomOptionsOffset): + return OperatorAddLargeCustomOptionsOffset(builder, largeCustomOptionsOffset) +def OperatorAddLargeCustomOptionsSize(builder, largeCustomOptionsSize): builder.PrependUint64Slot(10, largeCustomOptionsSize, 0) +def AddLargeCustomOptionsSize(builder, largeCustomOptionsSize): + return OperatorAddLargeCustomOptionsSize(builder, largeCustomOptionsSize) def OperatorEnd(builder): return builder.EndObject() def End(builder): return OperatorEnd(builder)
\ No newline at end of file |