aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDwight Lidman <dwight.lidman@arm.com>2021-07-19 13:43:05 +0200
committertim.hall <tim.hall@arm.com>2021-08-05 12:46:35 +0000
commit8a12da19e247750770bd0c2465d3690c1fcd7316 (patch)
tree7d49a80088464b4d62ac01217f9067a91b6e67f0
parent8ae292931aa9b4677092f51a46c0fb07a8807f89 (diff)
downloadethos-u-vela-8a12da19e247750770bd0c2465d3690c1fcd7316.tar.gz
MLBEDSW-4854: Update to TensorFlow 2.5
This commit updates the flatbuffers generated code to comply with TensorFlow 2.5, as well as stripping away some legacy code. Signed-off-by: Dwight Lidman <dwight.lidman@arm.com> Change-Id: I01fe47ec2bde6e78fdde21ee1bc0a71f560c53ae
-rw-r--r--ethosu/vela/operation.py13
-rw-r--r--ethosu/vela/tflite/AbsOptions.py4
-rw-r--r--ethosu/vela/tflite/AddNOptions.py4
-rw-r--r--ethosu/vela/tflite/AddOptions.py4
-rw-r--r--ethosu/vela/tflite/ArgMaxOptions.py4
-rw-r--r--ethosu/vela/tflite/ArgMinOptions.py4
-rw-r--r--ethosu/vela/tflite/BatchMatMulOptions.py14
-rw-r--r--ethosu/vela/tflite/BatchToSpaceNDOptions.py4
-rw-r--r--ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py4
-rw-r--r--ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py4
-rw-r--r--ethosu/vela/tflite/BroadcastToOptions.py26
-rw-r--r--ethosu/vela/tflite/Buffer.py9
-rw-r--r--ethosu/vela/tflite/BuiltinOperator.py13
-rw-r--r--ethosu/vela/tflite/BuiltinOptions.py8
-rw-r--r--ethosu/vela/tflite/CallOnceOptions.py34
-rw-r--r--ethosu/vela/tflite/CallOptions.py4
-rw-r--r--ethosu/vela/tflite/CastOptions.py4
-rw-r--r--ethosu/vela/tflite/ConcatEmbeddingsOptions.py14
-rw-r--r--ethosu/vela/tflite/ConcatenationOptions.py4
-rw-r--r--ethosu/vela/tflite/Conv2DOptions.py4
-rw-r--r--ethosu/vela/tflite/Conv3DOptions.py90
-rw-r--r--ethosu/vela/tflite/CosOptions.py4
-rw-r--r--ethosu/vela/tflite/CumsumOptions.py4
-rw-r--r--ethosu/vela/tflite/CustomQuantization.py9
-rw-r--r--ethosu/vela/tflite/DensifyOptions.py4
-rw-r--r--ethosu/vela/tflite/DepthToSpaceOptions.py4
-rw-r--r--ethosu/vela/tflite/DepthwiseConv2DOptions.py4
-rw-r--r--ethosu/vela/tflite/DequantizeOptions.py4
-rw-r--r--ethosu/vela/tflite/DimensionMetadata.py4
-rw-r--r--ethosu/vela/tflite/DivOptions.py4
-rw-r--r--ethosu/vela/tflite/EmbeddingLookupSparseOptions.py4
-rw-r--r--ethosu/vela/tflite/EqualOptions.py4
-rw-r--r--ethosu/vela/tflite/ExpOptions.py4
-rw-r--r--ethosu/vela/tflite/ExpandDimsOptions.py4
-rw-r--r--ethosu/vela/tflite/FakeQuantOptions.py4
-rw-r--r--ethosu/vela/tflite/FillOptions.py4
-rw-r--r--ethosu/vela/tflite/FloorDivOptions.py4
-rw-r--r--ethosu/vela/tflite/FloorModOptions.py4
-rw-r--r--ethosu/vela/tflite/FullyConnectedOptions.py4
-rw-r--r--ethosu/vela/tflite/GatherNdOptions.py4
-rw-r--r--ethosu/vela/tflite/GatherOptions.py14
-rw-r--r--ethosu/vela/tflite/GreaterEqualOptions.py4
-rw-r--r--ethosu/vela/tflite/GreaterOptions.py4
-rw-r--r--ethosu/vela/tflite/HardSwishOptions.py4
-rw-r--r--ethosu/vela/tflite/HashtableFindOptions.py26
-rw-r--r--ethosu/vela/tflite/HashtableImportOptions.py26
-rw-r--r--ethosu/vela/tflite/HashtableOptions.py50
-rw-r--r--ethosu/vela/tflite/HashtableSizeOptions.py26
-rw-r--r--ethosu/vela/tflite/IfOptions.py4
-rw-r--r--ethosu/vela/tflite/Int32Vector.py9
-rw-r--r--ethosu/vela/tflite/L2NormOptions.py4
-rw-r--r--ethosu/vela/tflite/LSHProjectionOptions.py4
-rw-r--r--ethosu/vela/tflite/LSTMOptions.py4
-rw-r--r--ethosu/vela/tflite/LeakyReluOptions.py4
-rw-r--r--ethosu/vela/tflite/LessEqualOptions.py4
-rw-r--r--ethosu/vela/tflite/LessOptions.py4
-rw-r--r--ethosu/vela/tflite/LocalResponseNormalizationOptions.py4
-rw-r--r--ethosu/vela/tflite/LogSoftmaxOptions.py4
-rw-r--r--ethosu/vela/tflite/LogicalAndOptions.py4
-rw-r--r--ethosu/vela/tflite/LogicalNotOptions.py4
-rw-r--r--ethosu/vela/tflite/LogicalOrOptions.py4
-rw-r--r--ethosu/vela/tflite/MatrixDiagOptions.py4
-rw-r--r--ethosu/vela/tflite/MatrixSetDiagOptions.py4
-rw-r--r--ethosu/vela/tflite/MaximumMinimumOptions.py4
-rw-r--r--ethosu/vela/tflite/Metadata.py4
-rw-r--r--ethosu/vela/tflite/MirrorPadOptions.py4
-rw-r--r--ethosu/vela/tflite/Model.py34
-rw-r--r--ethosu/vela/tflite/MulOptions.py4
-rw-r--r--ethosu/vela/tflite/NegOptions.py4
-rw-r--r--ethosu/vela/tflite/NonMaxSuppressionV4Options.py4
-rw-r--r--ethosu/vela/tflite/NonMaxSuppressionV5Options.py4
-rw-r--r--ethosu/vela/tflite/NotEqualOptions.py4
-rw-r--r--ethosu/vela/tflite/OneHotOptions.py4
-rw-r--r--ethosu/vela/tflite/Operator.py29
-rw-r--r--ethosu/vela/tflite/OperatorCode.py4
-rw-r--r--ethosu/vela/tflite/PackOptions.py4
-rw-r--r--ethosu/vela/tflite/PadOptions.py4
-rw-r--r--ethosu/vela/tflite/PadV2Options.py4
-rw-r--r--ethosu/vela/tflite/Pool2DOptions.py4
-rw-r--r--ethosu/vela/tflite/PowOptions.py4
-rw-r--r--ethosu/vela/tflite/QuantizationParameters.py26
-rw-r--r--ethosu/vela/tflite/QuantizeOptions.py6
-rw-r--r--ethosu/vela/tflite/RNNOptions.py6
-rw-r--r--ethosu/vela/tflite/RangeOptions.py6
-rw-r--r--ethosu/vela/tflite/RankOptions.py6
-rw-r--r--ethosu/vela/tflite/ReducerOptions.py6
-rw-r--r--ethosu/vela/tflite/ReshapeOptions.py11
-rw-r--r--ethosu/vela/tflite/ResizeBilinearOptions.py6
-rw-r--r--ethosu/vela/tflite/ResizeNearestNeighborOptions.py6
-rw-r--r--ethosu/vela/tflite/ReverseSequenceOptions.py6
-rw-r--r--ethosu/vela/tflite/ReverseV2Options.py6
-rw-r--r--ethosu/vela/tflite/Rfft2dOptions.py28
-rw-r--r--ethosu/vela/tflite/SVDFOptions.py6
-rw-r--r--ethosu/vela/tflite/ScatterNdOptions.py6
-rw-r--r--ethosu/vela/tflite/SegmentSumOptions.py6
-rw-r--r--ethosu/vela/tflite/SelectOptions.py6
-rw-r--r--ethosu/vela/tflite/SelectV2Options.py6
-rw-r--r--ethosu/vela/tflite/SequenceRNNOptions.py6
-rw-r--r--ethosu/vela/tflite/ShapeOptions.py6
-rw-r--r--ethosu/vela/tflite/SignatureDef.py16
-rw-r--r--ethosu/vela/tflite/SkipGramOptions.py6
-rw-r--r--ethosu/vela/tflite/SliceOptions.py6
-rw-r--r--ethosu/vela/tflite/SoftmaxOptions.py6
-rw-r--r--ethosu/vela/tflite/SpaceToBatchNDOptions.py6
-rw-r--r--ethosu/vela/tflite/SpaceToDepthOptions.py6
-rw-r--r--ethosu/vela/tflite/SparseToDenseOptions.py6
-rw-r--r--ethosu/vela/tflite/SparsityParameters.py21
-rw-r--r--ethosu/vela/tflite/SplitOptions.py6
-rw-r--r--ethosu/vela/tflite/SplitVOptions.py6
-rw-r--r--ethosu/vela/tflite/SquareOptions.py6
-rw-r--r--ethosu/vela/tflite/SquaredDifferenceOptions.py6
-rw-r--r--ethosu/vela/tflite/SqueezeOptions.py11
-rw-r--r--ethosu/vela/tflite/StridedSliceOptions.py6
-rw-r--r--ethosu/vela/tflite/SubGraph.py26
-rw-r--r--ethosu/vela/tflite/SubOptions.py6
-rw-r--r--ethosu/vela/tflite/Tensor.py16
-rw-r--r--ethosu/vela/tflite/TensorMap.py6
-rw-r--r--ethosu/vela/tflite/TensorType.py4
-rw-r--r--ethosu/vela/tflite/TileOptions.py6
-rw-r--r--ethosu/vela/tflite/TopKV2Options.py6
-rw-r--r--ethosu/vela/tflite/TransposeConvOptions.py6
-rw-r--r--ethosu/vela/tflite/TransposeOptions.py6
-rw-r--r--ethosu/vela/tflite/Uint16Vector.py11
-rw-r--r--ethosu/vela/tflite/Uint8Vector.py11
-rw-r--r--ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py6
-rw-r--r--ethosu/vela/tflite/UniqueOptions.py6
-rw-r--r--ethosu/vela/tflite/UnpackOptions.py6
-rw-r--r--ethosu/vela/tflite/WhereOptions.py6
-rw-r--r--ethosu/vela/tflite/WhileOptions.py6
-rw-r--r--ethosu/vela/tflite/ZerosLikeOptions.py6
-rw-r--r--ethosu/vela/tflite_mapping.py249
131 files changed, 1277 insertions, 79 deletions
diff --git a/ethosu/vela/operation.py b/ethosu/vela/operation.py
index ffa4717d..ca833e21 100644
--- a/ethosu/vela/operation.py
+++ b/ethosu/vela/operation.py
@@ -292,6 +292,19 @@ class Op(Enum):
Where = OperatorInfo()
While = OperatorInfo()
ZerosLike = OperatorInfo()
+ CallOnce = OperatorInfo()
+ BroadcastTo = OperatorInfo()
+ Rfft2D = OperatorInfo()
+ Conv3D = OperatorInfo()
+ Imag = OperatorInfo()
+ Real = OperatorInfo()
+ ComplexAbs = OperatorInfo()
+ Hashtable = OperatorInfo()
+ HashtableFind = OperatorInfo()
+ HashtableImport = OperatorInfo()
+ HashtableSize = OperatorInfo()
+ ReduceAll = OperatorInfo()
+ Conv3DTranspose = OperatorInfo()
@property
def info(self):
diff --git a/ethosu/vela/tflite/AbsOptions.py b/ethosu/vela/tflite/AbsOptions.py
index 0cbfb8c0..3da6cb0f 100644
--- a/ethosu/vela/tflite/AbsOptions.py
+++ b/ethosu/vela/tflite/AbsOptions.py
@@ -14,6 +14,10 @@ class AbsOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def AbsOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# AbsOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/AddNOptions.py b/ethosu/vela/tflite/AddNOptions.py
index b5c2ddb7..a29858bd 100644
--- a/ethosu/vela/tflite/AddNOptions.py
+++ b/ethosu/vela/tflite/AddNOptions.py
@@ -14,6 +14,10 @@ class AddNOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def AddNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# AddNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/AddOptions.py b/ethosu/vela/tflite/AddOptions.py
index 154e6d18..f0a232dc 100644
--- a/ethosu/vela/tflite/AddOptions.py
+++ b/ethosu/vela/tflite/AddOptions.py
@@ -14,6 +14,10 @@ class AddOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def AddOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# AddOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ArgMaxOptions.py b/ethosu/vela/tflite/ArgMaxOptions.py
index fbf1415e..741135dd 100644
--- a/ethosu/vela/tflite/ArgMaxOptions.py
+++ b/ethosu/vela/tflite/ArgMaxOptions.py
@@ -14,6 +14,10 @@ class ArgMaxOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ArgMaxOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ArgMaxOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ArgMinOptions.py b/ethosu/vela/tflite/ArgMinOptions.py
index 120fdca2..f62455f7 100644
--- a/ethosu/vela/tflite/ArgMinOptions.py
+++ b/ethosu/vela/tflite/ArgMinOptions.py
@@ -14,6 +14,10 @@ class ArgMinOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ArgMinOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ArgMinOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/BatchMatMulOptions.py b/ethosu/vela/tflite/BatchMatMulOptions.py
index 5be66835..771c36e2 100644
--- a/ethosu/vela/tflite/BatchMatMulOptions.py
+++ b/ethosu/vela/tflite/BatchMatMulOptions.py
@@ -14,6 +14,10 @@ class BatchMatMulOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def BatchMatMulOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BatchMatMulOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -32,7 +36,15 @@ class BatchMatMulOptions(object):
return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
return False
-def BatchMatMulOptionsStart(builder): builder.StartObject(2)
+ # BatchMatMulOptions
+ def AsymmetricQuantizeInputs(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ if o != 0:
+ return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos))
+ return False
+
+def BatchMatMulOptionsStart(builder): builder.StartObject(3)
def BatchMatMulOptionsAddAdjX(builder, adjX): builder.PrependBoolSlot(0, adjX, 0)
def BatchMatMulOptionsAddAdjY(builder, adjY): builder.PrependBoolSlot(1, adjY, 0)
+def BatchMatMulOptionsAddAsymmetricQuantizeInputs(builder, asymmetricQuantizeInputs): builder.PrependBoolSlot(2, asymmetricQuantizeInputs, 0)
def BatchMatMulOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/BatchToSpaceNDOptions.py b/ethosu/vela/tflite/BatchToSpaceNDOptions.py
index 3ddcfd3f..8398ca19 100644
--- a/ethosu/vela/tflite/BatchToSpaceNDOptions.py
+++ b/ethosu/vela/tflite/BatchToSpaceNDOptions.py
@@ -14,6 +14,10 @@ class BatchToSpaceNDOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def BatchToSpaceNDOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BatchToSpaceNDOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
index 0a0a83b7..c8af8e2c 100644
--- a/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
+++ b/ethosu/vela/tflite/BidirectionalSequenceLSTMOptions.py
@@ -14,6 +14,10 @@ class BidirectionalSequenceLSTMOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def BidirectionalSequenceLSTMOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BidirectionalSequenceLSTMOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
index e1f66ce2..4c6218f3 100644
--- a/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
+++ b/ethosu/vela/tflite/BidirectionalSequenceRNNOptions.py
@@ -14,6 +14,10 @@ class BidirectionalSequenceRNNOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def BidirectionalSequenceRNNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# BidirectionalSequenceRNNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/BroadcastToOptions.py b/ethosu/vela/tflite/BroadcastToOptions.py
new file mode 100644
index 00000000..5d11a9e6
--- /dev/null
+++ b/ethosu/vela/tflite/BroadcastToOptions.py
@@ -0,0 +1,26 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class BroadcastToOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsBroadcastToOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = BroadcastToOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def BroadcastToOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # BroadcastToOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def BroadcastToOptionsStart(builder): builder.StartObject(0)
+def BroadcastToOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/Buffer.py b/ethosu/vela/tflite/Buffer.py
index 754dee3b..387d7e9a 100644
--- a/ethosu/vela/tflite/Buffer.py
+++ b/ethosu/vela/tflite/Buffer.py
@@ -14,6 +14,10 @@ class Buffer(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def BufferBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Buffer
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,6 +44,11 @@ class Buffer(object):
return self._tab.VectorLen(o)
return 0
+ # Buffer
+ def DataIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def BufferStart(builder): builder.StartObject(1)
def BufferAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0)
def BufferStartDataVector(builder, numElems): return builder.StartVector(1, numElems, 1)
diff --git a/ethosu/vela/tflite/BuiltinOperator.py b/ethosu/vela/tflite/BuiltinOperator.py
index 73fed9b6..46dcab71 100644
--- a/ethosu/vela/tflite/BuiltinOperator.py
+++ b/ethosu/vela/tflite/BuiltinOperator.py
@@ -132,4 +132,17 @@ class BuiltinOperator(object):
BATCH_MATMUL = 126
PLACEHOLDER_FOR_GREATER_OP_CODES = 127
CUMSUM = 128
+ CALL_ONCE = 129
+ BROADCAST_TO = 130
+ RFFT2D = 131
+ CONV_3D = 132
+ IMAG = 133
+ REAL = 134
+ COMPLEX_ABS = 135
+ HASHTABLE = 136
+ HASHTABLE_FIND = 137
+ HASHTABLE_IMPORT = 138
+ HASHTABLE_SIZE = 139
+ REDUCE_ALL = 140
+ CONV_3D_TRANSPOSE = 141
diff --git a/ethosu/vela/tflite/BuiltinOptions.py b/ethosu/vela/tflite/BuiltinOptions.py
index 6be2d43a..d8076968 100644
--- a/ethosu/vela/tflite/BuiltinOptions.py
+++ b/ethosu/vela/tflite/BuiltinOptions.py
@@ -106,4 +106,12 @@ class BuiltinOptions(object):
SegmentSumOptions = 100
BatchMatMulOptions = 101
CumsumOptions = 102
+ CallOnceOptions = 103
+ BroadcastToOptions = 104
+ Rfft2dOptions = 105
+ Conv3DOptions = 106
+ HashtableOptions = 107
+ HashtableFindOptions = 108
+ HashtableImportOptions = 109
+ HashtableSizeOptions = 110
diff --git a/ethosu/vela/tflite/CallOnceOptions.py b/ethosu/vela/tflite/CallOnceOptions.py
new file mode 100644
index 00000000..5714c330
--- /dev/null
+++ b/ethosu/vela/tflite/CallOnceOptions.py
@@ -0,0 +1,34 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class CallOnceOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsCallOnceOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = CallOnceOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def CallOnceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # CallOnceOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+ # CallOnceOptions
+ def InitSubgraphIndex(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 0
+
+def CallOnceOptionsStart(builder): builder.StartObject(1)
+def CallOnceOptionsAddInitSubgraphIndex(builder, initSubgraphIndex): builder.PrependInt32Slot(0, initSubgraphIndex, 0)
+def CallOnceOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/CallOptions.py b/ethosu/vela/tflite/CallOptions.py
index 5ae2eeae..3216f8a1 100644
--- a/ethosu/vela/tflite/CallOptions.py
+++ b/ethosu/vela/tflite/CallOptions.py
@@ -14,6 +14,10 @@ class CallOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def CallOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CallOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/CastOptions.py b/ethosu/vela/tflite/CastOptions.py
index 70ae2e37..1f007650 100644
--- a/ethosu/vela/tflite/CastOptions.py
+++ b/ethosu/vela/tflite/CastOptions.py
@@ -14,6 +14,10 @@ class CastOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def CastOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CastOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ConcatEmbeddingsOptions.py b/ethosu/vela/tflite/ConcatEmbeddingsOptions.py
index 9d26c510..b8d55384 100644
--- a/ethosu/vela/tflite/ConcatEmbeddingsOptions.py
+++ b/ethosu/vela/tflite/ConcatEmbeddingsOptions.py
@@ -14,6 +14,10 @@ class ConcatEmbeddingsOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ConcatEmbeddingsOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ConcatEmbeddingsOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -48,6 +52,11 @@ class ConcatEmbeddingsOptions(object):
return 0
# ConcatEmbeddingsOptions
+ def NumColumnsPerChannelIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # ConcatEmbeddingsOptions
def EmbeddingDimPerChannel(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -69,6 +78,11 @@ class ConcatEmbeddingsOptions(object):
return self._tab.VectorLen(o)
return 0
+ # ConcatEmbeddingsOptions
+ def EmbeddingDimPerChannelIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
def ConcatEmbeddingsOptionsStart(builder): builder.StartObject(3)
def ConcatEmbeddingsOptionsAddNumChannels(builder, numChannels): builder.PrependInt32Slot(0, numChannels, 0)
def ConcatEmbeddingsOptionsAddNumColumnsPerChannel(builder, numColumnsPerChannel): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(numColumnsPerChannel), 0)
diff --git a/ethosu/vela/tflite/ConcatenationOptions.py b/ethosu/vela/tflite/ConcatenationOptions.py
index c8e0b6ab..f6928a6b 100644
--- a/ethosu/vela/tflite/ConcatenationOptions.py
+++ b/ethosu/vela/tflite/ConcatenationOptions.py
@@ -14,6 +14,10 @@ class ConcatenationOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ConcatenationOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ConcatenationOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Conv2DOptions.py b/ethosu/vela/tflite/Conv2DOptions.py
index ef49f751..a05b39cb 100644
--- a/ethosu/vela/tflite/Conv2DOptions.py
+++ b/ethosu/vela/tflite/Conv2DOptions.py
@@ -14,6 +14,10 @@ class Conv2DOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def Conv2DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Conv2DOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Conv3DOptions.py b/ethosu/vela/tflite/Conv3DOptions.py
new file mode 100644
index 00000000..0f998600
--- /dev/null
+++ b/ethosu/vela/tflite/Conv3DOptions.py
@@ -0,0 +1,90 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class Conv3DOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsConv3DOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = Conv3DOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def Conv3DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # Conv3DOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+ # Conv3DOptions
+ def Padding(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
+ return 0
+
+ # Conv3DOptions
+ def StrideD(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 0
+
+ # Conv3DOptions
+ def StrideW(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 0
+
+ # Conv3DOptions
+ def StrideH(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 0
+
+ # Conv3DOptions
+ def FusedActivationFunction(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
+ return 0
+
+ # Conv3DOptions
+ def DilationDFactor(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 1
+
+ # Conv3DOptions
+ def DilationWFactor(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 1
+
+ # Conv3DOptions
+ def DilationHFactor(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 1
+
+def Conv3DOptionsStart(builder): builder.StartObject(8)
+def Conv3DOptionsAddPadding(builder, padding): builder.PrependInt8Slot(0, padding, 0)
+def Conv3DOptionsAddStrideD(builder, strideD): builder.PrependInt32Slot(1, strideD, 0)
+def Conv3DOptionsAddStrideW(builder, strideW): builder.PrependInt32Slot(2, strideW, 0)
+def Conv3DOptionsAddStrideH(builder, strideH): builder.PrependInt32Slot(3, strideH, 0)
+def Conv3DOptionsAddFusedActivationFunction(builder, fusedActivationFunction): builder.PrependInt8Slot(4, fusedActivationFunction, 0)
+def Conv3DOptionsAddDilationDFactor(builder, dilationDFactor): builder.PrependInt32Slot(5, dilationDFactor, 1)
+def Conv3DOptionsAddDilationWFactor(builder, dilationWFactor): builder.PrependInt32Slot(6, dilationWFactor, 1)
+def Conv3DOptionsAddDilationHFactor(builder, dilationHFactor): builder.PrependInt32Slot(7, dilationHFactor, 1)
+def Conv3DOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/CosOptions.py b/ethosu/vela/tflite/CosOptions.py
index 7fbf8487..12d49268 100644
--- a/ethosu/vela/tflite/CosOptions.py
+++ b/ethosu/vela/tflite/CosOptions.py
@@ -14,6 +14,10 @@ class CosOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def CosOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CosOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/CumsumOptions.py b/ethosu/vela/tflite/CumsumOptions.py
index 33e086ef..91c45865 100644
--- a/ethosu/vela/tflite/CumsumOptions.py
+++ b/ethosu/vela/tflite/CumsumOptions.py
@@ -14,6 +14,10 @@ class CumsumOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def CumsumOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CumsumOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/CustomQuantization.py b/ethosu/vela/tflite/CustomQuantization.py
index 21ec0da4..f0ed6f00 100644
--- a/ethosu/vela/tflite/CustomQuantization.py
+++ b/ethosu/vela/tflite/CustomQuantization.py
@@ -14,6 +14,10 @@ class CustomQuantization(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def CustomQuantizationBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# CustomQuantization
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,6 +44,11 @@ class CustomQuantization(object):
return self._tab.VectorLen(o)
return 0
+ # CustomQuantization
+ def CustomIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def CustomQuantizationStart(builder): builder.StartObject(1)
def CustomQuantizationAddCustom(builder, custom): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(custom), 0)
def CustomQuantizationStartCustomVector(builder, numElems): return builder.StartVector(1, numElems, 1)
diff --git a/ethosu/vela/tflite/DensifyOptions.py b/ethosu/vela/tflite/DensifyOptions.py
index 12cbfb29..067b871c 100644
--- a/ethosu/vela/tflite/DensifyOptions.py
+++ b/ethosu/vela/tflite/DensifyOptions.py
@@ -14,6 +14,10 @@ class DensifyOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def DensifyOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DensifyOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/DepthToSpaceOptions.py b/ethosu/vela/tflite/DepthToSpaceOptions.py
index 97b93aa7..e6b44f42 100644
--- a/ethosu/vela/tflite/DepthToSpaceOptions.py
+++ b/ethosu/vela/tflite/DepthToSpaceOptions.py
@@ -14,6 +14,10 @@ class DepthToSpaceOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def DepthToSpaceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DepthToSpaceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/DepthwiseConv2DOptions.py b/ethosu/vela/tflite/DepthwiseConv2DOptions.py
index 9689383b..50dcdbfb 100644
--- a/ethosu/vela/tflite/DepthwiseConv2DOptions.py
+++ b/ethosu/vela/tflite/DepthwiseConv2DOptions.py
@@ -14,6 +14,10 @@ class DepthwiseConv2DOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def DepthwiseConv2DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DepthwiseConv2DOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/DequantizeOptions.py b/ethosu/vela/tflite/DequantizeOptions.py
index 5ef8b8dd..bd9f2e2d 100644
--- a/ethosu/vela/tflite/DequantizeOptions.py
+++ b/ethosu/vela/tflite/DequantizeOptions.py
@@ -14,6 +14,10 @@ class DequantizeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def DequantizeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DequantizeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/DimensionMetadata.py b/ethosu/vela/tflite/DimensionMetadata.py
index c9fe7cd6..1f8b60dc 100644
--- a/ethosu/vela/tflite/DimensionMetadata.py
+++ b/ethosu/vela/tflite/DimensionMetadata.py
@@ -14,6 +14,10 @@ class DimensionMetadata(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def DimensionMetadataBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DimensionMetadata
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/DivOptions.py b/ethosu/vela/tflite/DivOptions.py
index 905a3be0..2988a8e3 100644
--- a/ethosu/vela/tflite/DivOptions.py
+++ b/ethosu/vela/tflite/DivOptions.py
@@ -14,6 +14,10 @@ class DivOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def DivOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# DivOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py b/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py
index 7d9c1442..eaa83569 100644
--- a/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py
+++ b/ethosu/vela/tflite/EmbeddingLookupSparseOptions.py
@@ -14,6 +14,10 @@ class EmbeddingLookupSparseOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def EmbeddingLookupSparseOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# EmbeddingLookupSparseOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/EqualOptions.py b/ethosu/vela/tflite/EqualOptions.py
index f787ef85..b7b14bb3 100644
--- a/ethosu/vela/tflite/EqualOptions.py
+++ b/ethosu/vela/tflite/EqualOptions.py
@@ -14,6 +14,10 @@ class EqualOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def EqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# EqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ExpOptions.py b/ethosu/vela/tflite/ExpOptions.py
index eac1456e..ea1cfead 100644
--- a/ethosu/vela/tflite/ExpOptions.py
+++ b/ethosu/vela/tflite/ExpOptions.py
@@ -14,6 +14,10 @@ class ExpOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ExpOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ExpOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ExpandDimsOptions.py b/ethosu/vela/tflite/ExpandDimsOptions.py
index 69d63665..2350c6e7 100644
--- a/ethosu/vela/tflite/ExpandDimsOptions.py
+++ b/ethosu/vela/tflite/ExpandDimsOptions.py
@@ -14,6 +14,10 @@ class ExpandDimsOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ExpandDimsOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ExpandDimsOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/FakeQuantOptions.py b/ethosu/vela/tflite/FakeQuantOptions.py
index 46c371c3..d97da180 100644
--- a/ethosu/vela/tflite/FakeQuantOptions.py
+++ b/ethosu/vela/tflite/FakeQuantOptions.py
@@ -14,6 +14,10 @@ class FakeQuantOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def FakeQuantOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FakeQuantOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/FillOptions.py b/ethosu/vela/tflite/FillOptions.py
index 5a1e651a..f6b2ca3a 100644
--- a/ethosu/vela/tflite/FillOptions.py
+++ b/ethosu/vela/tflite/FillOptions.py
@@ -14,6 +14,10 @@ class FillOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def FillOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FillOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/FloorDivOptions.py b/ethosu/vela/tflite/FloorDivOptions.py
index 64b474fb..53a3c4c6 100644
--- a/ethosu/vela/tflite/FloorDivOptions.py
+++ b/ethosu/vela/tflite/FloorDivOptions.py
@@ -14,6 +14,10 @@ class FloorDivOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def FloorDivOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FloorDivOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/FloorModOptions.py b/ethosu/vela/tflite/FloorModOptions.py
index 37c8e5a5..6e5f679f 100644
--- a/ethosu/vela/tflite/FloorModOptions.py
+++ b/ethosu/vela/tflite/FloorModOptions.py
@@ -14,6 +14,10 @@ class FloorModOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def FloorModOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FloorModOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/FullyConnectedOptions.py b/ethosu/vela/tflite/FullyConnectedOptions.py
index 5475e3d9..601b57da 100644
--- a/ethosu/vela/tflite/FullyConnectedOptions.py
+++ b/ethosu/vela/tflite/FullyConnectedOptions.py
@@ -14,6 +14,10 @@ class FullyConnectedOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def FullyConnectedOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# FullyConnectedOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/GatherNdOptions.py b/ethosu/vela/tflite/GatherNdOptions.py
index f515eb5c..db09182b 100644
--- a/ethosu/vela/tflite/GatherNdOptions.py
+++ b/ethosu/vela/tflite/GatherNdOptions.py
@@ -14,6 +14,10 @@ class GatherNdOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GatherNdOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GatherNdOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/GatherOptions.py b/ethosu/vela/tflite/GatherOptions.py
index 9fbc3e40..5da9a9b3 100644
--- a/ethosu/vela/tflite/GatherOptions.py
+++ b/ethosu/vela/tflite/GatherOptions.py
@@ -14,6 +14,10 @@ class GatherOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GatherOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GatherOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -25,6 +29,14 @@ class GatherOptions(object):
return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
return 0
-def GatherOptionsStart(builder): builder.StartObject(1)
+ # GatherOptions
+ def BatchDims(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 0
+
+def GatherOptionsStart(builder): builder.StartObject(2)
def GatherOptionsAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0)
+def GatherOptionsAddBatchDims(builder, batchDims): builder.PrependInt32Slot(1, batchDims, 0)
def GatherOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/GreaterEqualOptions.py b/ethosu/vela/tflite/GreaterEqualOptions.py
index a29e200a..03a86fa2 100644
--- a/ethosu/vela/tflite/GreaterEqualOptions.py
+++ b/ethosu/vela/tflite/GreaterEqualOptions.py
@@ -14,6 +14,10 @@ class GreaterEqualOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GreaterEqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GreaterEqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/GreaterOptions.py b/ethosu/vela/tflite/GreaterOptions.py
index 59d63501..593e0d75 100644
--- a/ethosu/vela/tflite/GreaterOptions.py
+++ b/ethosu/vela/tflite/GreaterOptions.py
@@ -14,6 +14,10 @@ class GreaterOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def GreaterOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# GreaterOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/HardSwishOptions.py b/ethosu/vela/tflite/HardSwishOptions.py
index 4f6a5200..cbbf99cc 100644
--- a/ethosu/vela/tflite/HardSwishOptions.py
+++ b/ethosu/vela/tflite/HardSwishOptions.py
@@ -14,6 +14,10 @@ class HardSwishOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def HardSwishOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# HardSwishOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/HashtableFindOptions.py b/ethosu/vela/tflite/HashtableFindOptions.py
new file mode 100644
index 00000000..cc74ace2
--- /dev/null
+++ b/ethosu/vela/tflite/HashtableFindOptions.py
@@ -0,0 +1,26 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class HashtableFindOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsHashtableFindOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = HashtableFindOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def HashtableFindOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # HashtableFindOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def HashtableFindOptionsStart(builder): builder.StartObject(0)
+def HashtableFindOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/HashtableImportOptions.py b/ethosu/vela/tflite/HashtableImportOptions.py
new file mode 100644
index 00000000..64763c38
--- /dev/null
+++ b/ethosu/vela/tflite/HashtableImportOptions.py
@@ -0,0 +1,26 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class HashtableImportOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsHashtableImportOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = HashtableImportOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def HashtableImportOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # HashtableImportOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def HashtableImportOptionsStart(builder): builder.StartObject(0)
+def HashtableImportOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/HashtableOptions.py b/ethosu/vela/tflite/HashtableOptions.py
new file mode 100644
index 00000000..646085f4
--- /dev/null
+++ b/ethosu/vela/tflite/HashtableOptions.py
@@ -0,0 +1,50 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class HashtableOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsHashtableOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = HashtableOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def HashtableOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # HashtableOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+ # HashtableOptions
+ def TableId(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int32Flags, o + self._tab.Pos)
+ return 0
+
+ # HashtableOptions
+ def KeyDtype(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
+ return 0
+
+ # HashtableOptions
+ def ValueDtype(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ if o != 0:
+ return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
+ return 0
+
+def HashtableOptionsStart(builder): builder.StartObject(3)
+def HashtableOptionsAddTableId(builder, tableId): builder.PrependInt32Slot(0, tableId, 0)
+def HashtableOptionsAddKeyDtype(builder, keyDtype): builder.PrependInt8Slot(1, keyDtype, 0)
+def HashtableOptionsAddValueDtype(builder, valueDtype): builder.PrependInt8Slot(2, valueDtype, 0)
+def HashtableOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/HashtableSizeOptions.py b/ethosu/vela/tflite/HashtableSizeOptions.py
new file mode 100644
index 00000000..7baa0192
--- /dev/null
+++ b/ethosu/vela/tflite/HashtableSizeOptions.py
@@ -0,0 +1,26 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+
+class HashtableSizeOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsHashtableSizeOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = HashtableSizeOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def HashtableSizeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # HashtableSizeOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def HashtableSizeOptionsStart(builder): builder.StartObject(0)
+def HashtableSizeOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/IfOptions.py b/ethosu/vela/tflite/IfOptions.py
index 13f4e697..aad72769 100644
--- a/ethosu/vela/tflite/IfOptions.py
+++ b/ethosu/vela/tflite/IfOptions.py
@@ -14,6 +14,10 @@ class IfOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def IfOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# IfOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Int32Vector.py b/ethosu/vela/tflite/Int32Vector.py
index e70851b2..0575b2e8 100644
--- a/ethosu/vela/tflite/Int32Vector.py
+++ b/ethosu/vela/tflite/Int32Vector.py
@@ -14,6 +14,10 @@ class Int32Vector(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def Int32VectorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Int32Vector
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,6 +44,11 @@ class Int32Vector(object):
return self._tab.VectorLen(o)
return 0
+ # Int32Vector
+ def ValuesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def Int32VectorStart(builder): builder.StartObject(1)
def Int32VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
def Int32VectorStartValuesVector(builder, numElems): return builder.StartVector(4, numElems, 4)
diff --git a/ethosu/vela/tflite/L2NormOptions.py b/ethosu/vela/tflite/L2NormOptions.py
index 38bdf573..0b1212fc 100644
--- a/ethosu/vela/tflite/L2NormOptions.py
+++ b/ethosu/vela/tflite/L2NormOptions.py
@@ -14,6 +14,10 @@ class L2NormOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def L2NormOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# L2NormOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LSHProjectionOptions.py b/ethosu/vela/tflite/LSHProjectionOptions.py
index ad550be2..b545e78d 100644
--- a/ethosu/vela/tflite/LSHProjectionOptions.py
+++ b/ethosu/vela/tflite/LSHProjectionOptions.py
@@ -14,6 +14,10 @@ class LSHProjectionOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LSHProjectionOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LSHProjectionOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LSTMOptions.py b/ethosu/vela/tflite/LSTMOptions.py
index 2f519bc2..45b4af2c 100644
--- a/ethosu/vela/tflite/LSTMOptions.py
+++ b/ethosu/vela/tflite/LSTMOptions.py
@@ -14,6 +14,10 @@ class LSTMOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LSTMOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LSTMOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LeakyReluOptions.py b/ethosu/vela/tflite/LeakyReluOptions.py
index b61b21d5..5b8c647a 100644
--- a/ethosu/vela/tflite/LeakyReluOptions.py
+++ b/ethosu/vela/tflite/LeakyReluOptions.py
@@ -14,6 +14,10 @@ class LeakyReluOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LeakyReluOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LeakyReluOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LessEqualOptions.py b/ethosu/vela/tflite/LessEqualOptions.py
index d49b7289..8465ff3e 100644
--- a/ethosu/vela/tflite/LessEqualOptions.py
+++ b/ethosu/vela/tflite/LessEqualOptions.py
@@ -14,6 +14,10 @@ class LessEqualOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LessEqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LessEqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LessOptions.py b/ethosu/vela/tflite/LessOptions.py
index 469cb0b0..93f3edcd 100644
--- a/ethosu/vela/tflite/LessOptions.py
+++ b/ethosu/vela/tflite/LessOptions.py
@@ -14,6 +14,10 @@ class LessOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LessOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LessOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LocalResponseNormalizationOptions.py b/ethosu/vela/tflite/LocalResponseNormalizationOptions.py
index db875603..5f4399a3 100644
--- a/ethosu/vela/tflite/LocalResponseNormalizationOptions.py
+++ b/ethosu/vela/tflite/LocalResponseNormalizationOptions.py
@@ -14,6 +14,10 @@ class LocalResponseNormalizationOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LocalResponseNormalizationOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LocalResponseNormalizationOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LogSoftmaxOptions.py b/ethosu/vela/tflite/LogSoftmaxOptions.py
index 47893855..584d628c 100644
--- a/ethosu/vela/tflite/LogSoftmaxOptions.py
+++ b/ethosu/vela/tflite/LogSoftmaxOptions.py
@@ -14,6 +14,10 @@ class LogSoftmaxOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LogSoftmaxOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogSoftmaxOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LogicalAndOptions.py b/ethosu/vela/tflite/LogicalAndOptions.py
index cee1cdb4..1ec0e6e4 100644
--- a/ethosu/vela/tflite/LogicalAndOptions.py
+++ b/ethosu/vela/tflite/LogicalAndOptions.py
@@ -14,6 +14,10 @@ class LogicalAndOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LogicalAndOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogicalAndOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LogicalNotOptions.py b/ethosu/vela/tflite/LogicalNotOptions.py
index 9971450c..ce66ec3b 100644
--- a/ethosu/vela/tflite/LogicalNotOptions.py
+++ b/ethosu/vela/tflite/LogicalNotOptions.py
@@ -14,6 +14,10 @@ class LogicalNotOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LogicalNotOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogicalNotOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/LogicalOrOptions.py b/ethosu/vela/tflite/LogicalOrOptions.py
index e94a5dec..ae4b36b0 100644
--- a/ethosu/vela/tflite/LogicalOrOptions.py
+++ b/ethosu/vela/tflite/LogicalOrOptions.py
@@ -14,6 +14,10 @@ class LogicalOrOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def LogicalOrOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# LogicalOrOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/MatrixDiagOptions.py b/ethosu/vela/tflite/MatrixDiagOptions.py
index 0f64e657..85113659 100644
--- a/ethosu/vela/tflite/MatrixDiagOptions.py
+++ b/ethosu/vela/tflite/MatrixDiagOptions.py
@@ -14,6 +14,10 @@ class MatrixDiagOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def MatrixDiagOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MatrixDiagOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/MatrixSetDiagOptions.py b/ethosu/vela/tflite/MatrixSetDiagOptions.py
index 14178cf8..361d3b69 100644
--- a/ethosu/vela/tflite/MatrixSetDiagOptions.py
+++ b/ethosu/vela/tflite/MatrixSetDiagOptions.py
@@ -14,6 +14,10 @@ class MatrixSetDiagOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def MatrixSetDiagOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MatrixSetDiagOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/MaximumMinimumOptions.py b/ethosu/vela/tflite/MaximumMinimumOptions.py
index f0806e2d..86b94f9e 100644
--- a/ethosu/vela/tflite/MaximumMinimumOptions.py
+++ b/ethosu/vela/tflite/MaximumMinimumOptions.py
@@ -14,6 +14,10 @@ class MaximumMinimumOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def MaximumMinimumOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MaximumMinimumOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Metadata.py b/ethosu/vela/tflite/Metadata.py
index 273e51ee..bd2bcfd2 100644
--- a/ethosu/vela/tflite/Metadata.py
+++ b/ethosu/vela/tflite/Metadata.py
@@ -14,6 +14,10 @@ class Metadata(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def MetadataBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Metadata
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/MirrorPadOptions.py b/ethosu/vela/tflite/MirrorPadOptions.py
index 254ae217..fa408556 100644
--- a/ethosu/vela/tflite/MirrorPadOptions.py
+++ b/ethosu/vela/tflite/MirrorPadOptions.py
@@ -14,6 +14,10 @@ class MirrorPadOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def MirrorPadOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MirrorPadOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Model.py b/ethosu/vela/tflite/Model.py
index 52aac021..2593752a 100644
--- a/ethosu/vela/tflite/Model.py
+++ b/ethosu/vela/tflite/Model.py
@@ -14,6 +14,10 @@ class Model(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ModelBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Model
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -46,6 +50,11 @@ class Model(object):
return 0
# Model
+ def OperatorCodesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # Model
def Subgraphs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -66,6 +75,11 @@ class Model(object):
return 0
# Model
+ def SubgraphsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # Model
def Description(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -93,6 +107,11 @@ class Model(object):
return 0
# Model
+ def BuffersIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
+ return o == 0
+
+ # Model
def MetadataBuffer(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
if o != 0:
@@ -115,6 +134,11 @@ class Model(object):
return 0
# Model
+ def MetadataBufferIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
+ return o == 0
+
+ # Model
def Metadata(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
@@ -135,6 +159,11 @@ class Model(object):
return 0
# Model
+ def MetadataIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
+ return o == 0
+
+ # Model
def SignatureDefs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
if o != 0:
@@ -154,6 +183,11 @@ class Model(object):
return self._tab.VectorLen(o)
return 0
+ # Model
+ def SignatureDefsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
+ return o == 0
+
def ModelStart(builder): builder.StartObject(8)
def ModelAddVersion(builder, version): builder.PrependUint32Slot(0, version, 0)
def ModelAddOperatorCodes(builder, operatorCodes): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(operatorCodes), 0)
diff --git a/ethosu/vela/tflite/MulOptions.py b/ethosu/vela/tflite/MulOptions.py
index 55b9506f..5b53c4bb 100644
--- a/ethosu/vela/tflite/MulOptions.py
+++ b/ethosu/vela/tflite/MulOptions.py
@@ -14,6 +14,10 @@ class MulOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def MulOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# MulOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/NegOptions.py b/ethosu/vela/tflite/NegOptions.py
index 05d55c26..9cf217cc 100644
--- a/ethosu/vela/tflite/NegOptions.py
+++ b/ethosu/vela/tflite/NegOptions.py
@@ -14,6 +14,10 @@ class NegOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def NegOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NegOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py
index 6ad10a2e..4764bc00 100644
--- a/ethosu/vela/tflite/NonMaxSuppressionV4Options.py
+++ b/ethosu/vela/tflite/NonMaxSuppressionV4Options.py
@@ -14,6 +14,10 @@ class NonMaxSuppressionV4Options(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def NonMaxSuppressionV4OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NonMaxSuppressionV4Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py
index 99cbdbbf..ce84c863 100644
--- a/ethosu/vela/tflite/NonMaxSuppressionV5Options.py
+++ b/ethosu/vela/tflite/NonMaxSuppressionV5Options.py
@@ -14,6 +14,10 @@ class NonMaxSuppressionV5Options(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def NonMaxSuppressionV5OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NonMaxSuppressionV5Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/NotEqualOptions.py b/ethosu/vela/tflite/NotEqualOptions.py
index 4c511e93..b99152df 100644
--- a/ethosu/vela/tflite/NotEqualOptions.py
+++ b/ethosu/vela/tflite/NotEqualOptions.py
@@ -14,6 +14,10 @@ class NotEqualOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def NotEqualOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# NotEqualOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/OneHotOptions.py b/ethosu/vela/tflite/OneHotOptions.py
index 793a3e75..7bc9ba36 100644
--- a/ethosu/vela/tflite/OneHotOptions.py
+++ b/ethosu/vela/tflite/OneHotOptions.py
@@ -14,6 +14,10 @@ class OneHotOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def OneHotOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# OneHotOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Operator.py b/ethosu/vela/tflite/Operator.py
index cbae3dab..edec83bc 100644
--- a/ethosu/vela/tflite/Operator.py
+++ b/ethosu/vela/tflite/Operator.py
@@ -14,6 +14,10 @@ class Operator(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def OperatorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Operator
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -48,6 +52,11 @@ class Operator(object):
return 0
# Operator
+ def InputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # Operator
def Outputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -70,6 +79,11 @@ class Operator(object):
return 0
# Operator
+ def OutputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # Operator
def BuiltinOptionsType(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -109,6 +123,11 @@ class Operator(object):
return 0
# Operator
+ def CustomOptionsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14))
+ return o == 0
+
+ # Operator
def CustomOptionsFormat(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16))
if o != 0:
@@ -138,6 +157,11 @@ class Operator(object):
return 0
# Operator
+ def MutatingVariableInputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
+ return o == 0
+
+ # Operator
def Intermediates(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
if o != 0:
@@ -159,6 +183,11 @@ class Operator(object):
return self._tab.VectorLen(o)
return 0
+ # Operator
+ def IntermediatesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(20))
+ return o == 0
+
def OperatorStart(builder): builder.StartObject(9)
def OperatorAddOpcodeIndex(builder, opcodeIndex): builder.PrependUint32Slot(0, opcodeIndex, 0)
def OperatorAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0)
diff --git a/ethosu/vela/tflite/OperatorCode.py b/ethosu/vela/tflite/OperatorCode.py
index 5a0ba2a4..880c1a5d 100644
--- a/ethosu/vela/tflite/OperatorCode.py
+++ b/ethosu/vela/tflite/OperatorCode.py
@@ -14,6 +14,10 @@ class OperatorCode(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def OperatorCodeBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# OperatorCode
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/PackOptions.py b/ethosu/vela/tflite/PackOptions.py
index 6a8ee2bb..2d590c52 100644
--- a/ethosu/vela/tflite/PackOptions.py
+++ b/ethosu/vela/tflite/PackOptions.py
@@ -14,6 +14,10 @@ class PackOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def PackOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PackOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/PadOptions.py b/ethosu/vela/tflite/PadOptions.py
index d0833c68..58d33e54 100644
--- a/ethosu/vela/tflite/PadOptions.py
+++ b/ethosu/vela/tflite/PadOptions.py
@@ -14,6 +14,10 @@ class PadOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def PadOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PadOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/PadV2Options.py b/ethosu/vela/tflite/PadV2Options.py
index 5ea0d70c..2b81bdd5 100644
--- a/ethosu/vela/tflite/PadV2Options.py
+++ b/ethosu/vela/tflite/PadV2Options.py
@@ -14,6 +14,10 @@ class PadV2Options(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def PadV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PadV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Pool2DOptions.py b/ethosu/vela/tflite/Pool2DOptions.py
index b8b9f178..031629bb 100644
--- a/ethosu/vela/tflite/Pool2DOptions.py
+++ b/ethosu/vela/tflite/Pool2DOptions.py
@@ -14,6 +14,10 @@ class Pool2DOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def Pool2DOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Pool2DOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/PowOptions.py b/ethosu/vela/tflite/PowOptions.py
index 666ca488..b9c9f848 100644
--- a/ethosu/vela/tflite/PowOptions.py
+++ b/ethosu/vela/tflite/PowOptions.py
@@ -14,6 +14,10 @@ class PowOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def PowOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# PowOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/QuantizationParameters.py b/ethosu/vela/tflite/QuantizationParameters.py
index fcd686cf..50acb835 100644
--- a/ethosu/vela/tflite/QuantizationParameters.py
+++ b/ethosu/vela/tflite/QuantizationParameters.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class QuantizationParameters(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class QuantizationParameters(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def QuantizationParametersBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# QuantizationParameters
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -41,6 +47,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def MinIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # QuantizationParameters
def Max(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -63,6 +74,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def MaxIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # QuantizationParameters
def Scale(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -85,6 +101,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def ScaleIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # QuantizationParameters
def ZeroPoint(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -107,6 +128,11 @@ class QuantizationParameters(object):
return 0
# QuantizationParameters
+ def ZeroPointIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+ return o == 0
+
+ # QuantizationParameters
def DetailsType(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
diff --git a/ethosu/vela/tflite/QuantizeOptions.py b/ethosu/vela/tflite/QuantizeOptions.py
index 28af8cc9..a2a6babc 100644
--- a/ethosu/vela/tflite/QuantizeOptions.py
+++ b/ethosu/vela/tflite/QuantizeOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class QuantizeOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class QuantizeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def QuantizeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# QuantizeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/RNNOptions.py b/ethosu/vela/tflite/RNNOptions.py
index 397d716f..67bbe78f 100644
--- a/ethosu/vela/tflite/RNNOptions.py
+++ b/ethosu/vela/tflite/RNNOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class RNNOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class RNNOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def RNNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# RNNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/RangeOptions.py b/ethosu/vela/tflite/RangeOptions.py
index cb705b57..1a5bd0f3 100644
--- a/ethosu/vela/tflite/RangeOptions.py
+++ b/ethosu/vela/tflite/RangeOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class RangeOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class RangeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def RangeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# RangeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/RankOptions.py b/ethosu/vela/tflite/RankOptions.py
index 4e4a5ecd..37ad8a61 100644
--- a/ethosu/vela/tflite/RankOptions.py
+++ b/ethosu/vela/tflite/RankOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class RankOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class RankOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def RankOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# RankOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ReducerOptions.py b/ethosu/vela/tflite/ReducerOptions.py
index 93bbde17..56174b04 100644
--- a/ethosu/vela/tflite/ReducerOptions.py
+++ b/ethosu/vela/tflite/ReducerOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReducerOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ReducerOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ReducerOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReducerOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ReshapeOptions.py b/ethosu/vela/tflite/ReshapeOptions.py
index 157d45d9..234f4384 100644
--- a/ethosu/vela/tflite/ReshapeOptions.py
+++ b/ethosu/vela/tflite/ReshapeOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReshapeOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ReshapeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ReshapeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReshapeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,6 +46,11 @@ class ReshapeOptions(object):
return self._tab.VectorLen(o)
return 0
+ # ReshapeOptions
+ def NewShapeIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def ReshapeOptionsStart(builder): builder.StartObject(1)
def ReshapeOptionsAddNewShape(builder, newShape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(newShape), 0)
def ReshapeOptionsStartNewShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4)
diff --git a/ethosu/vela/tflite/ResizeBilinearOptions.py b/ethosu/vela/tflite/ResizeBilinearOptions.py
index fb05ca4b..d974adbf 100644
--- a/ethosu/vela/tflite/ResizeBilinearOptions.py
+++ b/ethosu/vela/tflite/ResizeBilinearOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ResizeBilinearOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ResizeBilinearOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ResizeBilinearOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ResizeBilinearOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
index e2642cef..9044279d 100644
--- a/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
+++ b/ethosu/vela/tflite/ResizeNearestNeighborOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ResizeNearestNeighborOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ResizeNearestNeighborOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ResizeNearestNeighborOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ResizeNearestNeighborOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ReverseSequenceOptions.py b/ethosu/vela/tflite/ReverseSequenceOptions.py
index cbaf96db..4f4e5d2f 100644
--- a/ethosu/vela/tflite/ReverseSequenceOptions.py
+++ b/ethosu/vela/tflite/ReverseSequenceOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReverseSequenceOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ReverseSequenceOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ReverseSequenceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReverseSequenceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ReverseV2Options.py b/ethosu/vela/tflite/ReverseV2Options.py
index dbac9362..02d148e4 100644
--- a/ethosu/vela/tflite/ReverseV2Options.py
+++ b/ethosu/vela/tflite/ReverseV2Options.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ReverseV2Options(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ReverseV2Options(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ReverseV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ReverseV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Rfft2dOptions.py b/ethosu/vela/tflite/Rfft2dOptions.py
new file mode 100644
index 00000000..da062ec9
--- /dev/null
+++ b/ethosu/vela/tflite/Rfft2dOptions.py
@@ -0,0 +1,28 @@
+# automatically generated by the FlatBuffers compiler, do not modify
+
+# namespace: tflite
+
+import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
+
+class Rfft2dOptions(object):
+ __slots__ = ['_tab']
+
+ @classmethod
+ def GetRootAsRfft2dOptions(cls, buf, offset):
+ n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
+ x = Rfft2dOptions()
+ x.Init(buf, n + offset)
+ return x
+
+ @classmethod
+ def Rfft2dOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
+ # Rfft2dOptions
+ def Init(self, buf, pos):
+ self._tab = flatbuffers.table.Table(buf, pos)
+
+def Rfft2dOptionsStart(builder): builder.StartObject(0)
+def Rfft2dOptionsEnd(builder): return builder.EndObject()
diff --git a/ethosu/vela/tflite/SVDFOptions.py b/ethosu/vela/tflite/SVDFOptions.py
index e4b34611..b5e59038 100644
--- a/ethosu/vela/tflite/SVDFOptions.py
+++ b/ethosu/vela/tflite/SVDFOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SVDFOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SVDFOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SVDFOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SVDFOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ScatterNdOptions.py b/ethosu/vela/tflite/ScatterNdOptions.py
index e6bf3a11..0a8adc17 100644
--- a/ethosu/vela/tflite/ScatterNdOptions.py
+++ b/ethosu/vela/tflite/ScatterNdOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ScatterNdOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ScatterNdOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ScatterNdOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ScatterNdOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SegmentSumOptions.py b/ethosu/vela/tflite/SegmentSumOptions.py
index d1c32133..3b231262 100644
--- a/ethosu/vela/tflite/SegmentSumOptions.py
+++ b/ethosu/vela/tflite/SegmentSumOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SegmentSumOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SegmentSumOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SegmentSumOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SegmentSumOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SelectOptions.py b/ethosu/vela/tflite/SelectOptions.py
index d67daf36..6176d0cf 100644
--- a/ethosu/vela/tflite/SelectOptions.py
+++ b/ethosu/vela/tflite/SelectOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SelectOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SelectOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SelectOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SelectOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SelectV2Options.py b/ethosu/vela/tflite/SelectV2Options.py
index 5d03fc2d..cc01eced 100644
--- a/ethosu/vela/tflite/SelectV2Options.py
+++ b/ethosu/vela/tflite/SelectV2Options.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SelectV2Options(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SelectV2Options(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SelectV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SelectV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SequenceRNNOptions.py b/ethosu/vela/tflite/SequenceRNNOptions.py
index 16eaf090..636ba1cb 100644
--- a/ethosu/vela/tflite/SequenceRNNOptions.py
+++ b/ethosu/vela/tflite/SequenceRNNOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SequenceRNNOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SequenceRNNOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SequenceRNNOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SequenceRNNOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ShapeOptions.py b/ethosu/vela/tflite/ShapeOptions.py
index 2d24c05f..e3f64d6c 100644
--- a/ethosu/vela/tflite/ShapeOptions.py
+++ b/ethosu/vela/tflite/ShapeOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ShapeOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ShapeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ShapeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ShapeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SignatureDef.py b/ethosu/vela/tflite/SignatureDef.py
index 149f8fc6..295ec854 100644
--- a/ethosu/vela/tflite/SignatureDef.py
+++ b/ethosu/vela/tflite/SignatureDef.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SignatureDef(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SignatureDef(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SignatureDefBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SignatureDef
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -39,6 +45,11 @@ class SignatureDef(object):
return 0
# SignatureDef
+ def InputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # SignatureDef
def Outputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -59,6 +70,11 @@ class SignatureDef(object):
return 0
# SignatureDef
+ def OutputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # SignatureDef
def MethodName(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
diff --git a/ethosu/vela/tflite/SkipGramOptions.py b/ethosu/vela/tflite/SkipGramOptions.py
index 0e8bdc1d..cd66e119 100644
--- a/ethosu/vela/tflite/SkipGramOptions.py
+++ b/ethosu/vela/tflite/SkipGramOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SkipGramOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SkipGramOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SkipGramOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SkipGramOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SliceOptions.py b/ethosu/vela/tflite/SliceOptions.py
index 4b41568d..ef16bb12 100644
--- a/ethosu/vela/tflite/SliceOptions.py
+++ b/ethosu/vela/tflite/SliceOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SliceOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SliceOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SliceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SoftmaxOptions.py b/ethosu/vela/tflite/SoftmaxOptions.py
index a7168534..7ee4a19f 100644
--- a/ethosu/vela/tflite/SoftmaxOptions.py
+++ b/ethosu/vela/tflite/SoftmaxOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SoftmaxOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SoftmaxOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SoftmaxOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SoftmaxOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SpaceToBatchNDOptions.py b/ethosu/vela/tflite/SpaceToBatchNDOptions.py
index b61ef96f..e066d610 100644
--- a/ethosu/vela/tflite/SpaceToBatchNDOptions.py
+++ b/ethosu/vela/tflite/SpaceToBatchNDOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SpaceToBatchNDOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SpaceToBatchNDOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SpaceToBatchNDOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SpaceToBatchNDOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SpaceToDepthOptions.py b/ethosu/vela/tflite/SpaceToDepthOptions.py
index d571174a..80f9f8ac 100644
--- a/ethosu/vela/tflite/SpaceToDepthOptions.py
+++ b/ethosu/vela/tflite/SpaceToDepthOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SpaceToDepthOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SpaceToDepthOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SpaceToDepthOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SpaceToDepthOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SparseToDenseOptions.py b/ethosu/vela/tflite/SparseToDenseOptions.py
index 826eee08..328aadf4 100644
--- a/ethosu/vela/tflite/SparseToDenseOptions.py
+++ b/ethosu/vela/tflite/SparseToDenseOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SparseToDenseOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SparseToDenseOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SparseToDenseOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SparseToDenseOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SparsityParameters.py b/ethosu/vela/tflite/SparsityParameters.py
index de550a67..b4d4c1c7 100644
--- a/ethosu/vela/tflite/SparsityParameters.py
+++ b/ethosu/vela/tflite/SparsityParameters.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SparsityParameters(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SparsityParameters(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SparsityParametersBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SparsityParameters
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -41,6 +47,11 @@ class SparsityParameters(object):
return 0
# SparsityParameters
+ def TraversalOrderIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # SparsityParameters
def BlockMap(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -63,6 +74,11 @@ class SparsityParameters(object):
return 0
# SparsityParameters
+ def BlockMapIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # SparsityParameters
def DimMetadata(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -82,6 +98,11 @@ class SparsityParameters(object):
return self._tab.VectorLen(o)
return 0
+ # SparsityParameters
+ def DimMetadataIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
def SparsityParametersStart(builder): builder.StartObject(3)
def SparsityParametersAddTraversalOrder(builder, traversalOrder): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(traversalOrder), 0)
def SparsityParametersStartTraversalOrderVector(builder, numElems): return builder.StartVector(4, numElems, 4)
diff --git a/ethosu/vela/tflite/SplitOptions.py b/ethosu/vela/tflite/SplitOptions.py
index 3207525b..54ce1b3b 100644
--- a/ethosu/vela/tflite/SplitOptions.py
+++ b/ethosu/vela/tflite/SplitOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SplitOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SplitOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SplitOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SplitOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SplitVOptions.py b/ethosu/vela/tflite/SplitVOptions.py
index 418959de..90f0d2e8 100644
--- a/ethosu/vela/tflite/SplitVOptions.py
+++ b/ethosu/vela/tflite/SplitVOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SplitVOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SplitVOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SplitVOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SplitVOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SquareOptions.py b/ethosu/vela/tflite/SquareOptions.py
index 56633f6a..fb72154e 100644
--- a/ethosu/vela/tflite/SquareOptions.py
+++ b/ethosu/vela/tflite/SquareOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SquareOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SquareOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SquareOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SquareOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SquaredDifferenceOptions.py b/ethosu/vela/tflite/SquaredDifferenceOptions.py
index 906855d1..dd1969a2 100644
--- a/ethosu/vela/tflite/SquaredDifferenceOptions.py
+++ b/ethosu/vela/tflite/SquaredDifferenceOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SquaredDifferenceOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SquaredDifferenceOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SquaredDifferenceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SquaredDifferenceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SqueezeOptions.py b/ethosu/vela/tflite/SqueezeOptions.py
index 25b294dc..1904abf1 100644
--- a/ethosu/vela/tflite/SqueezeOptions.py
+++ b/ethosu/vela/tflite/SqueezeOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SqueezeOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SqueezeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SqueezeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SqueezeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,6 +46,11 @@ class SqueezeOptions(object):
return self._tab.VectorLen(o)
return 0
+ # SqueezeOptions
+ def SqueezeDimsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def SqueezeOptionsStart(builder): builder.StartObject(1)
def SqueezeOptionsAddSqueezeDims(builder, squeezeDims): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(squeezeDims), 0)
def SqueezeOptionsStartSqueezeDimsVector(builder, numElems): return builder.StartVector(4, numElems, 4)
diff --git a/ethosu/vela/tflite/StridedSliceOptions.py b/ethosu/vela/tflite/StridedSliceOptions.py
index 3bbb36b8..c6cb7908 100644
--- a/ethosu/vela/tflite/StridedSliceOptions.py
+++ b/ethosu/vela/tflite/StridedSliceOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class StridedSliceOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class StridedSliceOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def StridedSliceOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# StridedSliceOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/SubGraph.py b/ethosu/vela/tflite/SubGraph.py
index eaa42fac..163124d6 100644
--- a/ethosu/vela/tflite/SubGraph.py
+++ b/ethosu/vela/tflite/SubGraph.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SubGraph(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SubGraph(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SubGraphBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SubGraph
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -39,6 +45,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def TensorsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # SubGraph
def Inputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -61,6 +72,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def InputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
+ return o == 0
+
+ # SubGraph
def Outputs(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
if o != 0:
@@ -83,6 +99,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def OutputsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8))
+ return o == 0
+
+ # SubGraph
def Operators(self, j):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
if o != 0:
@@ -103,6 +124,11 @@ class SubGraph(object):
return 0
# SubGraph
+ def OperatorsIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10))
+ return o == 0
+
+ # SubGraph
def Name(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
if o != 0:
diff --git a/ethosu/vela/tflite/SubOptions.py b/ethosu/vela/tflite/SubOptions.py
index c3ed40e1..1a9ba978 100644
--- a/ethosu/vela/tflite/SubOptions.py
+++ b/ethosu/vela/tflite/SubOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class SubOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class SubOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def SubOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# SubOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Tensor.py b/ethosu/vela/tflite/Tensor.py
index 4c39b7cb..6a947849 100644
--- a/ethosu/vela/tflite/Tensor.py
+++ b/ethosu/vela/tflite/Tensor.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Tensor(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class Tensor(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def TensorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Tensor
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -41,6 +47,11 @@ class Tensor(object):
return 0
# Tensor
+ def ShapeIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
+ # Tensor
def Type(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6))
if o != 0:
@@ -112,6 +123,11 @@ class Tensor(object):
return self._tab.VectorLen(o)
return 0
+ # Tensor
+ def ShapeSignatureIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(18))
+ return o == 0
+
def TensorStart(builder): builder.StartObject(8)
def TensorAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0)
def TensorStartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4)
diff --git a/ethosu/vela/tflite/TensorMap.py b/ethosu/vela/tflite/TensorMap.py
index e9b036d9..9b41e0b9 100644
--- a/ethosu/vela/tflite/TensorMap.py
+++ b/ethosu/vela/tflite/TensorMap.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TensorMap(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class TensorMap(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def TensorMapBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TensorMap
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/TensorType.py b/ethosu/vela/tflite/TensorType.py
index e0108818..a5235f45 100644
--- a/ethosu/vela/tflite/TensorType.py
+++ b/ethosu/vela/tflite/TensorType.py
@@ -15,4 +15,8 @@ class TensorType(object):
INT8 = 9
FLOAT64 = 10
COMPLEX128 = 11
+ UINT64 = 12
+ RESOURCE = 13
+ VARIANT = 14
+ UINT32 = 15
diff --git a/ethosu/vela/tflite/TileOptions.py b/ethosu/vela/tflite/TileOptions.py
index ec8396dc..73eebc64 100644
--- a/ethosu/vela/tflite/TileOptions.py
+++ b/ethosu/vela/tflite/TileOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TileOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class TileOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def TileOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TileOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/TopKV2Options.py b/ethosu/vela/tflite/TopKV2Options.py
index ccd51033..c8c13369 100644
--- a/ethosu/vela/tflite/TopKV2Options.py
+++ b/ethosu/vela/tflite/TopKV2Options.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TopKV2Options(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class TopKV2Options(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def TopKV2OptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TopKV2Options
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/TransposeConvOptions.py b/ethosu/vela/tflite/TransposeConvOptions.py
index 423571c8..f291141f 100644
--- a/ethosu/vela/tflite/TransposeConvOptions.py
+++ b/ethosu/vela/tflite/TransposeConvOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TransposeConvOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class TransposeConvOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def TransposeConvOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TransposeConvOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/TransposeOptions.py b/ethosu/vela/tflite/TransposeOptions.py
index 42c596d9..02969653 100644
--- a/ethosu/vela/tflite/TransposeOptions.py
+++ b/ethosu/vela/tflite/TransposeOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class TransposeOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class TransposeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def TransposeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# TransposeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/Uint16Vector.py b/ethosu/vela/tflite/Uint16Vector.py
index 750e52a4..247fada7 100644
--- a/ethosu/vela/tflite/Uint16Vector.py
+++ b/ethosu/vela/tflite/Uint16Vector.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Uint16Vector(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class Uint16Vector(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def Uint16VectorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Uint16Vector
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,6 +46,11 @@ class Uint16Vector(object):
return self._tab.VectorLen(o)
return 0
+ # Uint16Vector
+ def ValuesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def Uint16VectorStart(builder): builder.StartObject(1)
def Uint16VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
def Uint16VectorStartValuesVector(builder, numElems): return builder.StartVector(2, numElems, 2)
diff --git a/ethosu/vela/tflite/Uint8Vector.py b/ethosu/vela/tflite/Uint8Vector.py
index dc475f9f..ce3895e1 100644
--- a/ethosu/vela/tflite/Uint8Vector.py
+++ b/ethosu/vela/tflite/Uint8Vector.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class Uint8Vector(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class Uint8Vector(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def Uint8VectorBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# Uint8Vector
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
@@ -40,6 +46,11 @@ class Uint8Vector(object):
return self._tab.VectorLen(o)
return 0
+ # Uint8Vector
+ def ValuesIsNone(self):
+ o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
+ return o == 0
+
def Uint8VectorStart(builder): builder.StartObject(1)
def Uint8VectorAddValues(builder, values): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(values), 0)
def Uint8VectorStartValuesVector(builder, numElems): return builder.StartVector(1, numElems, 1)
diff --git a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
index b734f3ff..b945aa9f 100644
--- a/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
+++ b/ethosu/vela/tflite/UnidirectionalSequenceLSTMOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class UnidirectionalSequenceLSTMOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class UnidirectionalSequenceLSTMOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def UnidirectionalSequenceLSTMOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# UnidirectionalSequenceLSTMOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/UniqueOptions.py b/ethosu/vela/tflite/UniqueOptions.py
index 841c6977..1088ef7d 100644
--- a/ethosu/vela/tflite/UniqueOptions.py
+++ b/ethosu/vela/tflite/UniqueOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class UniqueOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class UniqueOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def UniqueOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# UniqueOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/UnpackOptions.py b/ethosu/vela/tflite/UnpackOptions.py
index eed40193..a8cc597b 100644
--- a/ethosu/vela/tflite/UnpackOptions.py
+++ b/ethosu/vela/tflite/UnpackOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class UnpackOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class UnpackOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def UnpackOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# UnpackOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/WhereOptions.py b/ethosu/vela/tflite/WhereOptions.py
index ab69f6aa..fd4f4408 100644
--- a/ethosu/vela/tflite/WhereOptions.py
+++ b/ethosu/vela/tflite/WhereOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class WhereOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class WhereOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def WhereOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# WhereOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/WhileOptions.py b/ethosu/vela/tflite/WhileOptions.py
index 7d5a6dfa..49f32a2e 100644
--- a/ethosu/vela/tflite/WhileOptions.py
+++ b/ethosu/vela/tflite/WhileOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class WhileOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class WhileOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def WhileOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# WhileOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite/ZerosLikeOptions.py b/ethosu/vela/tflite/ZerosLikeOptions.py
index e6aa9639..098d0512 100644
--- a/ethosu/vela/tflite/ZerosLikeOptions.py
+++ b/ethosu/vela/tflite/ZerosLikeOptions.py
@@ -3,6 +3,8 @@
# namespace: tflite
import flatbuffers
+from flatbuffers.compat import import_numpy
+np = import_numpy()
class ZerosLikeOptions(object):
__slots__ = ['_tab']
@@ -14,6 +16,10 @@ class ZerosLikeOptions(object):
x.Init(buf, n + offset)
return x
+ @classmethod
+ def ZerosLikeOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
+ return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
+
# ZerosLikeOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
diff --git a/ethosu/vela/tflite_mapping.py b/ethosu/vela/tflite_mapping.py
index 23a1a2b7..e0f24932 100644
--- a/ethosu/vela/tflite_mapping.py
+++ b/ethosu/vela/tflite_mapping.py
@@ -35,11 +35,14 @@ from .tflite import BatchMatMulOptions
from .tflite import BatchToSpaceNDOptions
from .tflite import BidirectionalSequenceLSTMOptions
from .tflite import BidirectionalSequenceRNNOptions
+from .tflite import BroadcastToOptions
+from .tflite import CallOnceOptions
from .tflite import CallOptions
from .tflite import CastOptions
from .tflite import ConcatEmbeddingsOptions
from .tflite import ConcatenationOptions
from .tflite import Conv2DOptions
+from .tflite import Conv3DOptions
from .tflite import CosOptions
from .tflite import CumsumOptions
from .tflite import DensifyOptions
@@ -61,6 +64,10 @@ from .tflite import GatherOptions
from .tflite import GreaterEqualOptions
from .tflite import GreaterOptions
from .tflite import HardSwishOptions
+from .tflite import HashtableFindOptions
+from .tflite import HashtableImportOptions
+from .tflite import HashtableOptions
+from .tflite import HashtableSizeOptions
from .tflite import IfOptions
from .tflite import L2NormOptions
from .tflite import LeakyReluOptions
@@ -97,6 +104,7 @@ from .tflite import ResizeBilinearOptions
from .tflite import ResizeNearestNeighborOptions
from .tflite import ReverseSequenceOptions
from .tflite import ReverseV2Options
+from .tflite import Rfft2dOptions
from .tflite import RNNOptions
from .tflite import ScatterNdOptions
from .tflite import SegmentSumOptions
@@ -281,6 +289,14 @@ builtin_options_map = {
BuiltinOptions.WhileOptions: WhileOptions.WhileOptions,
BuiltinOptions.BatchMatMulOptions: BatchMatMulOptions.BatchMatMulOptions,
BuiltinOptions.CumsumOptions: CumsumOptions.CumsumOptions,
+ BuiltinOptions.CallOnceOptions: CallOnceOptions.CallOnceOptions,
+ BuiltinOptions.BroadcastToOptions: BroadcastToOptions.BroadcastToOptions,
+ BuiltinOptions.Rfft2dOptions: Rfft2dOptions.Rfft2dOptions,
+ BuiltinOptions.Conv3DOptions: Conv3DOptions.Conv3DOptions,
+ BuiltinOptions.HashtableOptions: HashtableOptions.HashtableOptions,
+ BuiltinOptions.HashtableFindOptions: HashtableFindOptions.HashtableFindOptions,
+ BuiltinOptions.HashtableImportOptions: HashtableImportOptions.HashtableImportOptions,
+ BuiltinOptions.HashtableSizeOptions: HashtableSizeOptions.HashtableSizeOptions,
}
builtin_options_inv_map = inverse_map(builtin_options_map)
@@ -450,44 +466,6 @@ activation_function_inv_map = inverse_map(activation_function_map)
fused_act = ("fused_activation_function", activation_deserialize, activation_serialize)
padding = ("padding", padding_deserialize, padding_serialize)
-pool2d_opts = OptionsSerializer(
- "Pool2DOptions", (padding, "stride_w", "stride_h", "filter_width", "filter_height", fused_act,)
-)
-
-depthwise_opts = OptionsSerializer(
- "DepthwiseConv2DOptions",
- (padding, "stride_w", "stride_h", "depth_multiplier", fused_act, "dilation_w_factor", "dilation_h_factor",),
-)
-
-conv2d_opts = OptionsSerializer(
- "Conv2DOptions", (padding, "stride_w", "stride_h", fused_act, "dilation_w_factor", "dilation_h_factor",)
-)
-
-lstm_opts = OptionsSerializer(
- "LSTMOptions", (fused_act, "cell_clip", "proj_clip", "kernel_type", "asymmetric_quantize_inputs")
-)
-
-unidir_seq_lstm_opts = OptionsSerializer(
- "UnidirectionalSequenceLSTMOptions",
- (fused_act, "cell_clip", "proj_clip", "time_major", "asymmetric_quantize_inputs",),
-)
-
-bidir_seq_lstm_opts = OptionsSerializer(
- "BidirectionalSequenceLSTMOptions",
- (fused_act, "cell_clip", "proj_clip", "merge_outputs", "time_major", "asymmetric_quantize_inputs"),
-)
-
-rnn_opts = OptionsSerializer("RNNOptions", (fused_act, "asymmetric_quantize_inputs"))
-
-seq_rnn_opts = OptionsSerializer("SequenceRNNOptions", ("time_major", fused_act, "asymmetric_quantize_inputs",))
-
-bidir_seq_rnn_opts = OptionsSerializer(
- "BidirectionalSequenceRNNOptions", ("time_major", fused_act, "merge_outputs", "asymmetric_quantize_inputs")
-)
-
-
-reducer_opts = OptionsSerializer("ReducerOptions", ("keep_dims",))
-
is_int_vec = True
TFLITE_NO_INDICES = TensorIndices([], [], [])
@@ -507,14 +485,33 @@ builtin_operator_map = {
OptionsSerializer("AddOptions", (fused_act, "pot_scale_int16")),
TFLITE_IFM_IFM2_INDICES,
),
- BuiltinOperator.AVERAGE_POOL_2D: (Op.AvgPool, pool2d_opts, TFLITE_IFM_INDICES),
+ BuiltinOperator.AVERAGE_POOL_2D: (
+ Op.AvgPool,
+ OptionsSerializer(
+ "Pool2DOptions", ("filter_height", "filter_width", fused_act, padding, "stride_h", "stride_w")
+ ),
+ TFLITE_IFM_INDICES,
+ ),
BuiltinOperator.CONCATENATION: (
Op.ConcatTFLite,
OptionsSerializer("ConcatenationOptions", ("axis", fused_act)),
TFLITE_CONCAT_INDICES,
),
- BuiltinOperator.CONV_2D: (Op.Conv2DBias, conv2d_opts, TFLITE_IFM_WEIGHTS_BIAS_INDICES),
- BuiltinOperator.DEPTHWISE_CONV_2D: (Op.DepthwiseConv2DBias, depthwise_opts, TFLITE_IFM_WEIGHTS_BIAS_INDICES),
+ BuiltinOperator.CONV_2D: (
+ Op.Conv2DBias,
+ OptionsSerializer(
+ "Conv2DOptions", ("dilation_h_factor", "dilation_w_factor", fused_act, padding, "stride_h", "stride_w")
+ ),
+ TFLITE_IFM_WEIGHTS_BIAS_INDICES,
+ ),
+ BuiltinOperator.DEPTHWISE_CONV_2D: (
+ Op.DepthwiseConv2DBias,
+ OptionsSerializer(
+ "DepthwiseConv2DOptions",
+ ("depth_multiplier", "dilation_h_factor", "dilation_w_factor", fused_act, padding, "stride_h", "stride_w"),
+ ),
+ TFLITE_IFM_WEIGHTS_BIAS_INDICES,
+ ),
BuiltinOperator.DEPTH_TO_SPACE: (
Op.DepthToSpace,
OptionsSerializer("DepthToSpaceOptions", ("block_size",)),
@@ -526,16 +523,22 @@ builtin_operator_map = {
BuiltinOperator.FULLY_CONNECTED: (
Op.FullyConnected,
OptionsSerializer(
- "FullyConnectedOptions", (fused_act, "weights_format", "asymmetric_quantize_inputs", "keep_num_dims")
+ "FullyConnectedOptions", ("asymmetric_quantize_inputs", fused_act, "keep_num_dims", "weights_format")
),
TFLITE_IFM_WEIGHTS_BIAS_INDICES,
),
BuiltinOperator.HASHTABLE_LOOKUP: (Op.HashtableLookup, None, TFLITE_NO_INDICES),
BuiltinOperator.L2_NORMALIZATION: (Op.L2Norm, OptionsSerializer("L2NormOptions", (fused_act,)), TFLITE_NO_INDICES),
- BuiltinOperator.L2_POOL_2D: (Op.L2Pool2D, pool2d_opts, TFLITE_NO_INDICES),
+ BuiltinOperator.L2_POOL_2D: (
+ Op.L2Pool2D,
+ OptionsSerializer(
+ "Pool2DOptions", ("filter_height", "filter_width", fused_act, padding, "stride_h", "stride_w")
+ ),
+ TFLITE_NO_INDICES,
+ ),
BuiltinOperator.LOCAL_RESPONSE_NORMALIZATION: (
Op.LRN,
- OptionsSerializer("LocalResponseNormalizationOptions", ("radius", "bias", "alpha", "beta")),
+ OptionsSerializer("LocalResponseNormalizationOptions", ("alpha", "beta", "bias", "radius")),
TFLITE_NO_INDICES,
),
BuiltinOperator.LOGISTIC: (Op.Sigmoid, None, TFLITE_IFM_INDICES),
@@ -544,15 +547,29 @@ builtin_operator_map = {
OptionsSerializer("LSHProjectionOptions", ("type",)),
TFLITE_NO_INDICES,
),
- BuiltinOperator.LSTM: (Op.Lstm, lstm_opts, TFLITE_IFM_WEIGHTS_INDICES),
- BuiltinOperator.MAX_POOL_2D: (Op.MaxPool, pool2d_opts, TFLITE_IFM_INDICES),
+ BuiltinOperator.LSTM: (
+ Op.Lstm,
+ OptionsSerializer(
+ "LSTMOptions", ("asymmetric_quantize_inputs", "cell_clip", fused_act, "kernel_type", "proj_clip")
+ ),
+ TFLITE_IFM_WEIGHTS_INDICES,
+ ),
+ BuiltinOperator.MAX_POOL_2D: (
+ Op.MaxPool,
+ OptionsSerializer(
+ "Pool2DOptions", ("filter_height", "filter_width", fused_act, padding, "stride_h", "stride_w")
+ ),
+ TFLITE_IFM_INDICES,
+ ),
BuiltinOperator.MUL: (Op.Mul, OptionsSerializer("MulOptions", (fused_act,)), TFLITE_IFM_IFM2_INDICES),
BuiltinOperator.RELU: (Op.Relu, None, TFLITE_IFM_INDICES),
BuiltinOperator.RELU_N1_TO_1: (Op.ReluN1To1, None, TFLITE_IFM_INDICES),
BuiltinOperator.RELU6: (Op.Relu6, None, TFLITE_IFM_INDICES),
BuiltinOperator.RESHAPE: (
Op.Reshape,
- OptionsSerializer("ReshapeOptions", (("new_shape", is_int_vec),)),
+ OptionsSerializer(
+ "ReshapeOptions", (("new_shape", is_int_vec), "new_shape_as_numpy", "new_shape_is_none", "new_shape_length")
+ ),
TFLITE_IFM_INDICES,
),
BuiltinOperator.RESIZE_BILINEAR: (
@@ -560,7 +577,11 @@ builtin_operator_map = {
OptionsSerializer("ResizeBilinearOptions", ("align_corners", "half_pixel_centers")),
TFLITE_IFM_INDICES,
),
- BuiltinOperator.RNN: (Op.Rnn, rnn_opts, TFLITE_IFM_WEIGHTS_INDICES),
+ BuiltinOperator.RNN: (
+ Op.Rnn,
+ OptionsSerializer("RNNOptions", ("asymmetric_quantize_inputs", fused_act)),
+ TFLITE_IFM_WEIGHTS_INDICES,
+ ),
BuiltinOperator.SOFTMAX: (Op.Softmax, OptionsSerializer("SoftmaxOptions", ("beta",)), TFLITE_IFM_INDICES),
BuiltinOperator.SPACE_TO_DEPTH: (
Op.SpaceToDepth,
@@ -569,7 +590,7 @@ builtin_operator_map = {
),
BuiltinOperator.SVDF: (
Op.Svdf,
- OptionsSerializer("SVDFOptions", ("rank", fused_act, "asymmetric_quantize_inputs")),
+ OptionsSerializer("SVDFOptions", ("asymmetric_quantize_inputs", fused_act, "rank")),
TFLITE_NO_INDICES,
),
BuiltinOperator.TANH: (Op.Tanh, None, TFLITE_IFM_INDICES),
@@ -578,20 +599,22 @@ builtin_operator_map = {
OptionsSerializer(
"ConcatEmbeddingsOptions",
(
+ "embedding_dim_per_channel",
+ "embedding_dim_per_channel_as_numpy",
+ "embedding_dim_per_channel_is_none",
+ "embedding_dim_per_channel_length",
"num_channels",
"num_columns_per_channel",
"num_columns_per_channel_as_numpy",
- "num_columns_per_channel_as_length",
- "embedding_dim_per_channel",
- "embedding_dim_per_channel_as_numpy",
- "embedding_dim_per_channel_as_length",
+ "num_columns_per_channel_is_none",
+ "num_columns_per_channel_length",
),
),
TFLITE_NO_INDICES,
),
BuiltinOperator.SKIP_GRAM: (
Op.SkipGram,
- OptionsSerializer("SkipGramOptions", ("ngram_size", "max_skip_size", "include_all_ngrams")),
+ OptionsSerializer("SkipGramOptions", ("include_all_ngrams", "max_skip_size", "ngram_size")),
TFLITE_NO_INDICES,
),
BuiltinOperator.CALL: (Op.Call, OptionsSerializer("CallOptions", ("subgraph",)), TFLITE_NO_INDICES),
@@ -603,10 +626,14 @@ builtin_operator_map = {
BuiltinOperator.PAD: (Op.Pad, OptionsSerializer("PadOptions"), TFLITE_IFM_INDICES),
BuiltinOperator.UNIDIRECTIONAL_SEQUENCE_RNN: (
Op.UnidirectionalSequenceRnn,
- seq_rnn_opts,
+ OptionsSerializer("SequenceRNNOptions", ("asymmetric_quantize_inputs", fused_act, "time_major")),
TFLITE_IFM_WEIGHTS_INDICES,
),
- BuiltinOperator.GATHER: (Op.GatherV2, OptionsSerializer("GatherOptions", ("axis",)), TFLITE_NO_INDICES),
+ BuiltinOperator.GATHER: (
+ Op.GatherV2,
+ OptionsSerializer("GatherOptions", ("axis", "batch_dims")),
+ TFLITE_NO_INDICES,
+ ),
BuiltinOperator.BATCH_TO_SPACE_ND: (
Op.BatchToSpaceND,
OptionsSerializer("BatchToSpaceNDOptions"),
@@ -618,33 +645,41 @@ builtin_operator_map = {
TFLITE_NO_INDICES,
),
BuiltinOperator.TRANSPOSE: (Op.Transpose, OptionsSerializer("TransposeOptions"), TFLITE_NO_INDICES),
- BuiltinOperator.MEAN: (Op.Mean, reducer_opts, TFLITE_IFM_INDICES),
+ BuiltinOperator.MEAN: (Op.Mean, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_IFM_INDICES),
BuiltinOperator.SUB: (
Op.Sub,
- OptionsSerializer("SubOptions", (fused_act, "pot_scale_int16",)),
+ OptionsSerializer("SubOptions", (fused_act, "pot_scale_int16")),
TFLITE_IFM_IFM2_INDICES,
),
BuiltinOperator.DIV: (Op.Div, OptionsSerializer("DivOptions", (fused_act,)), TFLITE_NO_INDICES),
BuiltinOperator.SQUEEZE: (
Op.Squeeze,
- OptionsSerializer("SqueezeOptions", (("squeeze_dims", is_int_vec),)),
+ OptionsSerializer(
+ "SqueezeOptions",
+ (("squeeze_dims", is_int_vec), "squeeze_dims_as_numpy", "squeeze_dims_is_none", "squeeze_dims_length"),
+ ),
TFLITE_IFM_INDICES,
),
BuiltinOperator.UNIDIRECTIONAL_SEQUENCE_LSTM: (
Op.UnidirectionalSequenceLstm,
- unidir_seq_lstm_opts,
+ OptionsSerializer(
+ "UnidirectionalSequenceLSTMOptions",
+ ("asymmetric_quantize_inputs", "cell_clip", fused_act, "proj_clip", "time_major"),
+ ),
TFLITE_IFM_WEIGHTS_INDICES,
),
BuiltinOperator.STRIDED_SLICE: (
Op.StridedSlice,
OptionsSerializer(
- "StridedSliceOptions", ("begin_mask", "end_mask", "ellipsis_mask", "new_axis_mask", "shrink_axis_mask"),
+ "StridedSliceOptions", ("begin_mask", "ellipsis_mask", "end_mask", "new_axis_mask", "shrink_axis_mask")
),
TFLITE_IFM_INDICES,
),
BuiltinOperator.BIDIRECTIONAL_SEQUENCE_RNN: (
Op.BidirectionalSequenceRnn,
- bidir_seq_rnn_opts,
+ OptionsSerializer(
+ "BidirectionalSequenceRNNOptions", ("asymmetric_quantize_inputs", fused_act, "merge_outputs", "time_major")
+ ),
TFLITE_IFM_WEIGHTS_INDICES,
),
BuiltinOperator.EXP: (Op.Exp, OptionsSerializer("ExpOptions"), TFLITE_IFM_INDICES),
@@ -654,7 +689,10 @@ builtin_operator_map = {
BuiltinOperator.DELEGATE: (Op.Delegate, None, TFLITE_NO_INDICES),
BuiltinOperator.BIDIRECTIONAL_SEQUENCE_LSTM: (
Op.BidirectionalSequenceLstm,
- bidir_seq_lstm_opts,
+ OptionsSerializer(
+ "BidirectionalSequenceLSTMOptions",
+ ("asymmetric_quantize_inputs", "cell_clip", fused_act, "merge_outputs", "proj_clip", "time_major"),
+ ),
TFLITE_IFM_WEIGHTS_INDICES,
),
BuiltinOperator.CAST: (
@@ -687,7 +725,7 @@ builtin_operator_map = {
BuiltinOperator.SIN: (Op.Sin, None, TFLITE_NO_INDICES),
BuiltinOperator.TRANSPOSE_CONV: (
Op.Conv2DBackpropInput,
- OptionsSerializer("TransposeConvOptions", (padding, "stride_w", "stride_h")),
+ OptionsSerializer("TransposeConvOptions", (padding, "stride_h", "stride_w")),
TFLITE_CONV2D_BACKPROP_INDICES,
),
BuiltinOperator.SPARSE_TO_DENSE: (
@@ -700,7 +738,7 @@ builtin_operator_map = {
BuiltinOperator.EQUAL: (Op.Equal, OptionsSerializer("EqualOptions"), TFLITE_NO_INDICES),
BuiltinOperator.NOT_EQUAL: (Op.NotEqual, OptionsSerializer("NotEqualOptions"), TFLITE_NO_INDICES),
BuiltinOperator.LOG: (Op.Log, None, TFLITE_NO_INDICES),
- BuiltinOperator.SUM: (Op.Sum, reducer_opts, TFLITE_NO_INDICES),
+ BuiltinOperator.SUM: (Op.Sum, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_NO_INDICES),
BuiltinOperator.SQRT: (Op.Sqrt, None, TFLITE_NO_INDICES),
BuiltinOperator.RSQRT: (Op.Rsqrt, None, TFLITE_NO_INDICES),
BuiltinOperator.SHAPE: (
@@ -716,20 +754,20 @@ builtin_operator_map = {
),
BuiltinOperator.FAKE_QUANT: (
Op.FakeQuantWithMinMaxArgs,
- OptionsSerializer("FakeQuantOptions", ("min", "max", "num_bits", "narrow_range")),
+ OptionsSerializer("FakeQuantOptions", ("max", "min", "narrow_range", "num_bits")),
TFLITE_NO_INDICES,
),
- BuiltinOperator.REDUCE_PROD: (Op.Prod, reducer_opts, TFLITE_NO_INDICES),
- BuiltinOperator.REDUCE_MAX: (Op.Max, reducer_opts, TFLITE_NO_INDICES),
- BuiltinOperator.PACK: (Op.Pack, OptionsSerializer("PackOptions", ("values_count", "axis")), TFLITE_IFM_INDICES),
+ BuiltinOperator.REDUCE_PROD: (Op.Prod, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_NO_INDICES),
+ BuiltinOperator.REDUCE_MAX: (Op.Max, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_NO_INDICES),
+ BuiltinOperator.PACK: (Op.Pack, OptionsSerializer("PackOptions", ("axis", "values_count")), TFLITE_IFM_INDICES),
BuiltinOperator.LOGICAL_OR: (Op.LogicalOr, OptionsSerializer("LogicalOrOptions"), TFLITE_NO_INDICES),
BuiltinOperator.ONE_HOT: (Op.OneHot, OptionsSerializer("OneHotOptions", ("axis",)), TFLITE_NO_INDICES),
BuiltinOperator.LOGICAL_AND: (Op.LogicalAnd, OptionsSerializer("LogicalAndOptions"), TFLITE_NO_INDICES),
BuiltinOperator.LOGICAL_NOT: (Op.LogicalNot, OptionsSerializer("LogicalNotOptions"), TFLITE_NO_INDICES),
- BuiltinOperator.UNPACK: (Op.Unpack, OptionsSerializer("UnpackOptions", ("num", "axis")), TFLITE_IFM_INDICES),
- BuiltinOperator.REDUCE_MIN: (Op.Min, reducer_opts, TFLITE_NO_INDICES),
+ BuiltinOperator.UNPACK: (Op.Unpack, OptionsSerializer("UnpackOptions", ("axis", "num")), TFLITE_IFM_INDICES),
+ BuiltinOperator.REDUCE_MIN: (Op.Min, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_NO_INDICES),
BuiltinOperator.FLOOR_DIV: (Op.FloorDiv, OptionsSerializer("FloorDivOptions"), TFLITE_NO_INDICES),
- BuiltinOperator.REDUCE_ANY: (Op.Any, reducer_opts, TFLITE_NO_INDICES),
+ BuiltinOperator.REDUCE_ANY: (Op.Any, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_NO_INDICES),
BuiltinOperator.SQUARE: (Op.Square, OptionsSerializer("SquareOptions"), TFLITE_NO_INDICES),
BuiltinOperator.ZEROS_LIKE: (Op.ZerosLike, OptionsSerializer("ZerosLikeOptions"), TFLITE_NO_INDICES),
BuiltinOperator.FILL: (Op.Fill, OptionsSerializer("FillOptions"), TFLITE_NO_INDICES),
@@ -764,7 +802,7 @@ builtin_operator_map = {
BuiltinOperator.ELU: (Op.Elu, None, TFLITE_NO_INDICES),
BuiltinOperator.REVERSE_SEQUENCE: (
Op.ReverseSequence,
- OptionsSerializer("ReverseSequenceOptions", ("seq_dim", "batch_dim")),
+ OptionsSerializer("ReverseSequenceOptions", ("batch_dim", "seq_dim")),
TFLITE_NO_INDICES,
),
BuiltinOperator.MATRIX_DIAG: (Op.MatrixDiag, OptionsSerializer("MatrixDiagOptions"), TFLITE_NO_INDICES),
@@ -774,12 +812,12 @@ builtin_operator_map = {
BuiltinOperator.HARD_SWISH: (Op.HardSwish, OptionsSerializer("HardSwishOptions"), TFLITE_IFM_INDICES),
BuiltinOperator.IF: (
Op.If,
- OptionsSerializer("IfOptions", ("then_subgraph_index", "else_subgraph_index")),
+ OptionsSerializer("IfOptions", ("else_subgraph_index", "then_subgraph_index")),
TFLITE_NO_INDICES,
),
BuiltinOperator.WHILE: (
Op.While,
- OptionsSerializer("WhileOptions", ("cond_subgraph_index", "body_subgraph_index")),
+ OptionsSerializer("WhileOptions", ("body_subgraph_index", "cond_subgraph_index")),
TFLITE_NO_INDICES,
),
BuiltinOperator.NON_MAX_SUPPRESSION_V4: (
@@ -798,7 +836,7 @@ builtin_operator_map = {
BuiltinOperator.SEGMENT_SUM: (Op.SegmentSum, OptionsSerializer("SegmentSumOptions"), TFLITE_NO_INDICES),
BuiltinOperator.BATCH_MATMUL: (
Op.BatchMatMul,
- OptionsSerializer("BatchMatMulOptions", ("adj_x", "adj_y")),
+ OptionsSerializer("BatchMatMulOptions", ("adj_x", "adj_y", "asymmetric_quantize_inputs")),
TFLITE_NO_INDICES,
),
BuiltinOperator.CUMSUM: (
@@ -806,7 +844,64 @@ builtin_operator_map = {
OptionsSerializer("CumsumOptions", ("exclusive", "reverse")),
TFLITE_NO_INDICES,
),
- BuiltinOperator.CUSTOM: (Op.Custom, CustomOptionsSerializer(), TFLITE_NO_INDICES),
+ BuiltinOperator.CALL_ONCE: (
+ Op.CallOnce,
+ OptionsSerializer("CallOnceOptions", ("init_subgraph_index",)),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.BROADCAST_TO: (Op.BroadcastTo, OptionsSerializer("BroadcastToOptions"), TFLITE_NO_INDICES),
+ BuiltinOperator.RFFT2D: (Op.Rfft2D, OptionsSerializer("Rfft2dOptions"), TFLITE_NO_INDICES),
+ BuiltinOperator.CONV_3D: (
+ Op.Conv3D,
+ OptionsSerializer(
+ "Conv3DOptions",
+ (
+ "dilation_d_factor",
+ "dilation_h_factor",
+ "dilation_w_factor",
+ fused_act,
+ padding,
+ "stride_d",
+ "stride_h",
+ "stride_w",
+ ),
+ ),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.IMAG: (Op.Imag, None, TFLITE_NO_INDICES),
+ BuiltinOperator.REAL: (Op.Real, None, TFLITE_NO_INDICES),
+ BuiltinOperator.COMPLEX_ABS: (Op.ComplexAbs, None, TFLITE_NO_INDICES),
+ BuiltinOperator.HASHTABLE: (
+ Op.Hashtable,
+ OptionsSerializer("HashtableOptions", ("key_dtype", "table_id", "value_dtype")),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.HASHTABLE_FIND: (Op.HashtableFind, OptionsSerializer("HashtableFindOptions"), TFLITE_NO_INDICES),
+ BuiltinOperator.HASHTABLE_IMPORT: (
+ Op.HashtableImport,
+ OptionsSerializer("HashtableImportOptions"),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.HASHTABLE_SIZE: (Op.HashtableSize, OptionsSerializer("HashtableSizeOptions"), TFLITE_NO_INDICES),
+ BuiltinOperator.REDUCE_ALL: (Op.ReduceAll, OptionsSerializer("ReducerOptions", ("keep_dims",)), TFLITE_NO_INDICES),
+ BuiltinOperator.CONV_3D_TRANSPOSE: (
+ Op.Conv3DTranspose,
+ OptionsSerializer(
+ "Conv3DOptions",
+ (
+ "dilation_d_factor",
+ "dilation_h_factor",
+ "dilation_w_factor",
+ fused_act,
+ padding,
+ "stride_d",
+ "stride_h",
+ "stride_w",
+ ),
+ ),
+ TFLITE_NO_INDICES,
+ ),
+ BuiltinOperator.CUSTOM: (Op.Custom, None, TFLITE_NO_INDICES),
}
builtin_operator_inv_map = {v[0]: (k, v[1], v[2]) for k, v in builtin_operator_map.items()}