From 8a12da19e247750770bd0c2465d3690c1fcd7316 Mon Sep 17 00:00:00 2001 From: Dwight Lidman Date: Mon, 19 Jul 2021 13:43:05 +0200 Subject: 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 Change-Id: I01fe47ec2bde6e78fdde21ee1bc0a71f560c53ae --- ethosu/vela/tflite/AbsOptions.py | 4 + ethosu/vela/tflite/AddNOptions.py | 4 + ethosu/vela/tflite/AddOptions.py | 4 + ethosu/vela/tflite/ArgMaxOptions.py | 4 + ethosu/vela/tflite/ArgMinOptions.py | 4 + ethosu/vela/tflite/BatchMatMulOptions.py | 14 +++- ethosu/vela/tflite/BatchToSpaceNDOptions.py | 4 + .../tflite/BidirectionalSequenceLSTMOptions.py | 4 + .../vela/tflite/BidirectionalSequenceRNNOptions.py | 4 + ethosu/vela/tflite/BroadcastToOptions.py | 26 +++++++ ethosu/vela/tflite/Buffer.py | 9 +++ ethosu/vela/tflite/BuiltinOperator.py | 13 ++++ ethosu/vela/tflite/BuiltinOptions.py | 8 ++ ethosu/vela/tflite/CallOnceOptions.py | 34 ++++++++ ethosu/vela/tflite/CallOptions.py | 4 + ethosu/vela/tflite/CastOptions.py | 4 + ethosu/vela/tflite/ConcatEmbeddingsOptions.py | 14 ++++ ethosu/vela/tflite/ConcatenationOptions.py | 4 + ethosu/vela/tflite/Conv2DOptions.py | 4 + ethosu/vela/tflite/Conv3DOptions.py | 90 ++++++++++++++++++++++ ethosu/vela/tflite/CosOptions.py | 4 + ethosu/vela/tflite/CumsumOptions.py | 4 + ethosu/vela/tflite/CustomQuantization.py | 9 +++ ethosu/vela/tflite/DensifyOptions.py | 4 + ethosu/vela/tflite/DepthToSpaceOptions.py | 4 + ethosu/vela/tflite/DepthwiseConv2DOptions.py | 4 + ethosu/vela/tflite/DequantizeOptions.py | 4 + ethosu/vela/tflite/DimensionMetadata.py | 4 + ethosu/vela/tflite/DivOptions.py | 4 + ethosu/vela/tflite/EmbeddingLookupSparseOptions.py | 4 + ethosu/vela/tflite/EqualOptions.py | 4 + ethosu/vela/tflite/ExpOptions.py | 4 + ethosu/vela/tflite/ExpandDimsOptions.py | 4 + ethosu/vela/tflite/FakeQuantOptions.py | 4 + ethosu/vela/tflite/FillOptions.py | 4 + ethosu/vela/tflite/FloorDivOptions.py | 4 + ethosu/vela/tflite/FloorModOptions.py | 4 + ethosu/vela/tflite/FullyConnectedOptions.py | 4 + ethosu/vela/tflite/GatherNdOptions.py | 4 + ethosu/vela/tflite/GatherOptions.py | 14 +++- ethosu/vela/tflite/GreaterEqualOptions.py | 4 + ethosu/vela/tflite/GreaterOptions.py | 4 + ethosu/vela/tflite/HardSwishOptions.py | 4 + ethosu/vela/tflite/HashtableFindOptions.py | 26 +++++++ ethosu/vela/tflite/HashtableImportOptions.py | 26 +++++++ ethosu/vela/tflite/HashtableOptions.py | 50 ++++++++++++ ethosu/vela/tflite/HashtableSizeOptions.py | 26 +++++++ ethosu/vela/tflite/IfOptions.py | 4 + ethosu/vela/tflite/Int32Vector.py | 9 +++ ethosu/vela/tflite/L2NormOptions.py | 4 + ethosu/vela/tflite/LSHProjectionOptions.py | 4 + ethosu/vela/tflite/LSTMOptions.py | 4 + ethosu/vela/tflite/LeakyReluOptions.py | 4 + ethosu/vela/tflite/LessEqualOptions.py | 4 + ethosu/vela/tflite/LessOptions.py | 4 + .../tflite/LocalResponseNormalizationOptions.py | 4 + ethosu/vela/tflite/LogSoftmaxOptions.py | 4 + ethosu/vela/tflite/LogicalAndOptions.py | 4 + ethosu/vela/tflite/LogicalNotOptions.py | 4 + ethosu/vela/tflite/LogicalOrOptions.py | 4 + ethosu/vela/tflite/MatrixDiagOptions.py | 4 + ethosu/vela/tflite/MatrixSetDiagOptions.py | 4 + ethosu/vela/tflite/MaximumMinimumOptions.py | 4 + ethosu/vela/tflite/Metadata.py | 4 + ethosu/vela/tflite/MirrorPadOptions.py | 4 + ethosu/vela/tflite/Model.py | 34 ++++++++ ethosu/vela/tflite/MulOptions.py | 4 + ethosu/vela/tflite/NegOptions.py | 4 + ethosu/vela/tflite/NonMaxSuppressionV4Options.py | 4 + ethosu/vela/tflite/NonMaxSuppressionV5Options.py | 4 + ethosu/vela/tflite/NotEqualOptions.py | 4 + ethosu/vela/tflite/OneHotOptions.py | 4 + ethosu/vela/tflite/Operator.py | 29 +++++++ ethosu/vela/tflite/OperatorCode.py | 4 + ethosu/vela/tflite/PackOptions.py | 4 + ethosu/vela/tflite/PadOptions.py | 4 + ethosu/vela/tflite/PadV2Options.py | 4 + ethosu/vela/tflite/Pool2DOptions.py | 4 + ethosu/vela/tflite/PowOptions.py | 4 + ethosu/vela/tflite/QuantizationParameters.py | 26 +++++++ ethosu/vela/tflite/QuantizeOptions.py | 6 ++ ethosu/vela/tflite/RNNOptions.py | 6 ++ ethosu/vela/tflite/RangeOptions.py | 6 ++ ethosu/vela/tflite/RankOptions.py | 6 ++ ethosu/vela/tflite/ReducerOptions.py | 6 ++ ethosu/vela/tflite/ReshapeOptions.py | 11 +++ ethosu/vela/tflite/ResizeBilinearOptions.py | 6 ++ ethosu/vela/tflite/ResizeNearestNeighborOptions.py | 6 ++ ethosu/vela/tflite/ReverseSequenceOptions.py | 6 ++ ethosu/vela/tflite/ReverseV2Options.py | 6 ++ ethosu/vela/tflite/Rfft2dOptions.py | 28 +++++++ ethosu/vela/tflite/SVDFOptions.py | 6 ++ ethosu/vela/tflite/ScatterNdOptions.py | 6 ++ ethosu/vela/tflite/SegmentSumOptions.py | 6 ++ ethosu/vela/tflite/SelectOptions.py | 6 ++ ethosu/vela/tflite/SelectV2Options.py | 6 ++ ethosu/vela/tflite/SequenceRNNOptions.py | 6 ++ ethosu/vela/tflite/ShapeOptions.py | 6 ++ ethosu/vela/tflite/SignatureDef.py | 16 ++++ ethosu/vela/tflite/SkipGramOptions.py | 6 ++ ethosu/vela/tflite/SliceOptions.py | 6 ++ ethosu/vela/tflite/SoftmaxOptions.py | 6 ++ ethosu/vela/tflite/SpaceToBatchNDOptions.py | 6 ++ ethosu/vela/tflite/SpaceToDepthOptions.py | 6 ++ ethosu/vela/tflite/SparseToDenseOptions.py | 6 ++ ethosu/vela/tflite/SparsityParameters.py | 21 +++++ ethosu/vela/tflite/SplitOptions.py | 6 ++ ethosu/vela/tflite/SplitVOptions.py | 6 ++ ethosu/vela/tflite/SquareOptions.py | 6 ++ ethosu/vela/tflite/SquaredDifferenceOptions.py | 6 ++ ethosu/vela/tflite/SqueezeOptions.py | 11 +++ ethosu/vela/tflite/StridedSliceOptions.py | 6 ++ ethosu/vela/tflite/SubGraph.py | 26 +++++++ ethosu/vela/tflite/SubOptions.py | 6 ++ ethosu/vela/tflite/Tensor.py | 16 ++++ ethosu/vela/tflite/TensorMap.py | 6 ++ ethosu/vela/tflite/TensorType.py | 4 + ethosu/vela/tflite/TileOptions.py | 6 ++ ethosu/vela/tflite/TopKV2Options.py | 6 ++ ethosu/vela/tflite/TransposeConvOptions.py | 6 ++ ethosu/vela/tflite/TransposeOptions.py | 6 ++ ethosu/vela/tflite/Uint16Vector.py | 11 +++ ethosu/vela/tflite/Uint8Vector.py | 11 +++ .../tflite/UnidirectionalSequenceLSTMOptions.py | 6 ++ ethosu/vela/tflite/UniqueOptions.py | 6 ++ ethosu/vela/tflite/UnpackOptions.py | 6 ++ ethosu/vela/tflite/WhereOptions.py | 6 ++ ethosu/vela/tflite/WhileOptions.py | 6 ++ ethosu/vela/tflite/ZerosLikeOptions.py | 6 ++ 129 files changed, 1092 insertions(+), 2 deletions(-) create mode 100644 ethosu/vela/tflite/BroadcastToOptions.py create mode 100644 ethosu/vela/tflite/CallOnceOptions.py create mode 100644 ethosu/vela/tflite/Conv3DOptions.py create mode 100644 ethosu/vela/tflite/HashtableFindOptions.py create mode 100644 ethosu/vela/tflite/HashtableImportOptions.py create mode 100644 ethosu/vela/tflite/HashtableOptions.py create mode 100644 ethosu/vela/tflite/HashtableSizeOptions.py create mode 100644 ethosu/vela/tflite/Rfft2dOptions.py (limited to 'ethosu/vela/tflite') 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) @@ -47,6 +51,11 @@ class ConcatEmbeddingsOptions(object): return self._tab.VectorLen(o) 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)) @@ -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) @@ -45,6 +49,11 @@ class Model(object): return self._tab.VectorLen(o) 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)) @@ -65,6 +74,11 @@ class Model(object): return self._tab.VectorLen(o) 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)) @@ -92,6 +106,11 @@ class Model(object): return self._tab.VectorLen(o) 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)) @@ -114,6 +133,11 @@ class Model(object): return self._tab.VectorLen(o) 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)) @@ -134,6 +158,11 @@ class Model(object): return self._tab.VectorLen(o) 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)) @@ -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) @@ -47,6 +51,11 @@ class Operator(object): return self._tab.VectorLen(o) 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)) @@ -69,6 +78,11 @@ class Operator(object): return self._tab.VectorLen(o) 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)) @@ -108,6 +122,11 @@ class Operator(object): return self._tab.VectorLen(o) 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)) @@ -137,6 +156,11 @@ class Operator(object): return self._tab.VectorLen(o) 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)) @@ -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) @@ -40,6 +46,11 @@ class QuantizationParameters(object): return self._tab.VectorLen(o) 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)) @@ -62,6 +73,11 @@ class QuantizationParameters(object): return self._tab.VectorLen(o) 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)) @@ -84,6 +100,11 @@ class QuantizationParameters(object): return self._tab.VectorLen(o) 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)) @@ -106,6 +127,11 @@ class QuantizationParameters(object): return self._tab.VectorLen(o) 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)) 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) @@ -38,6 +44,11 @@ class SignatureDef(object): return self._tab.VectorLen(o) 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)) @@ -58,6 +69,11 @@ class SignatureDef(object): return self._tab.VectorLen(o) 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)) 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) @@ -40,6 +46,11 @@ class SparsityParameters(object): return self._tab.VectorLen(o) 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)) @@ -62,6 +73,11 @@ class SparsityParameters(object): return self._tab.VectorLen(o) 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)) @@ -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) @@ -38,6 +44,11 @@ class SubGraph(object): return self._tab.VectorLen(o) 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)) @@ -60,6 +71,11 @@ class SubGraph(object): return self._tab.VectorLen(o) 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)) @@ -82,6 +98,11 @@ class SubGraph(object): return self._tab.VectorLen(o) 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)) @@ -102,6 +123,11 @@ class SubGraph(object): return self._tab.VectorLen(o) 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)) 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) @@ -40,6 +46,11 @@ class Tensor(object): return self._tab.VectorLen(o) 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)) @@ -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) -- cgit v1.2.1