aboutsummaryrefslogtreecommitdiff
path: root/ethosu/vela/tflite/Operator.py
diff options
context:
space:
mode:
authorWilliam Isaksson <william.isaksson@arm.com>2023-11-22 22:27:58 +0100
committerRickard Bolin <rickard.bolin@arm.com>2023-12-20 08:46:09 +0000
commitf4a511ffe7cd6c77e2effcbdf0843b2ef89d8df4 (patch)
tree9edfe95c8fa72bf8178e478a45cd69a8dc0e8ee4 /ethosu/vela/tflite/Operator.py
parentd2e03c61b028f9f84fd61812ea8905bf68f482e3 (diff)
downloadethos-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/Operator.py')
-rw-r--r--ethosu/vela/tflite/Operator.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/ethosu/vela/tflite/Operator.py b/ethosu/vela/tflite/Operator.py
index 23d787b3..a0b5a54c 100644
--- a/ethosu/vela/tflite/Operator.py
+++ b/ethosu/vela/tflite/Operator.py
@@ -208,7 +208,24 @@ class Operator(object):
return self._tab.Get(flatbuffers.number_types.Uint64Flags, o + self._tab.Pos)
return 0
-def OperatorStart(builder): builder.StartObject(11)
+ # Operator
+ def BuiltinOptions2Type(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(26))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos)
+ return 0
+
+ # Operator
+ def BuiltinOptions2(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(28))
+ if o != 0:
+ from flatbuffers.table import Table
+ obj = Table(bytearray(), 0)
+ self._tab.Union(obj, o)
+ return obj
+ return None
+
+def OperatorStart(builder): builder.StartObject(13)
def Start(builder):
return OperatorStart(builder)
def OperatorAddOpcodeIndex(builder, opcodeIndex): builder.PrependUint32Slot(0, opcodeIndex, 0)
@@ -259,6 +276,12 @@ def AddLargeCustomOptionsOffset(builder, largeCustomOptionsOffset):
def OperatorAddLargeCustomOptionsSize(builder, largeCustomOptionsSize): builder.PrependUint64Slot(10, largeCustomOptionsSize, 0)
def AddLargeCustomOptionsSize(builder, largeCustomOptionsSize):
return OperatorAddLargeCustomOptionsSize(builder, largeCustomOptionsSize)
+def OperatorAddBuiltinOptions2Type(builder, builtinOptions2Type): builder.PrependUint8Slot(11, builtinOptions2Type, 0)
+def AddBuiltinOptions2Type(builder, builtinOptions2Type):
+ return OperatorAddBuiltinOptions2Type(builder, builtinOptions2Type)
+def OperatorAddBuiltinOptions2(builder, builtinOptions2): builder.PrependUOffsetTRelativeSlot(12, flatbuffers.number_types.UOffsetTFlags.py_type(builtinOptions2), 0)
+def AddBuiltinOptions2(builder, builtinOptions2):
+ return OperatorAddBuiltinOptions2(builder, builtinOptions2)
def OperatorEnd(builder): return builder.EndObject()
def End(builder):
return OperatorEnd(builder) \ No newline at end of file