diff options
author | Kevin Cheng <kevin.cheng@arm.com> | 2021-03-03 11:21:43 -0800 |
---|---|---|
committer | Kevin Cheng <kevin.cheng@arm.com> | 2021-04-27 16:01:59 -0700 |
commit | 550ccc52de231621c0bf0c05ae2a398eec37ff51 (patch) | |
tree | d4a5bd8d24560135784208c0fe35615b1d043249 /verif/tosa | |
parent | cf6224e6e8ba4fc2984de3e542538c38e27c9f57 (diff) | |
download | reference_model-550ccc52de231621c0bf0c05ae2a398eec37ff51.tar.gz |
Replace serialization/ and verif/ with MLPlatform's serialization_lib submodule
- Remove Usage and Format
- Run black on verif/*.py scripts
Signed-off-by: Kevin Cheng <kevin.cheng@arm.com>
Change-Id: Ie81515891eb0039540f614894f4b6b0e0e78ba74
Diffstat (limited to 'verif/tosa')
34 files changed, 0 insertions, 2270 deletions
diff --git a/verif/tosa/ArithmeticRightShiftAttribute.py b/verif/tosa/ArithmeticRightShiftAttribute.py deleted file mode 100644 index eaa52ab..0000000 --- a/verif/tosa/ArithmeticRightShiftAttribute.py +++ /dev/null @@ -1,45 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class ArithmeticRightShiftAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsArithmeticRightShiftAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = ArithmeticRightShiftAttribute() - x.Init(buf, n + offset) - return x - - # ArithmeticRightShiftAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # ArithmeticRightShiftAttribute - def Round(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) - return False - -def ArithmeticRightShiftAttributeStart(builder): builder.StartObject(1) -def ArithmeticRightShiftAttributeAddRound(builder, round): builder.PrependBoolSlot(0, round, 0) -def ArithmeticRightShiftAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/Attribute.py b/verif/tosa/Attribute.py deleted file mode 100644 index 5d79a08..0000000 --- a/verif/tosa/Attribute.py +++ /dev/null @@ -1,37 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -class Attribute(object): - NONE = 0 - Pool2dAttribute = 1 - Conv2dAttribute = 2 - TransposeConv2dAttribute = 3 - ReluNAttribute = 4 - AxisAttribute = 5 - ReshapeAttribute = 6 - SliceAttribute = 7 - TileAttribute = 8 - ResizeAttribute = 9 - ClampAttribute = 10 - RescaleAttribute = 11 - MulAttribute = 12 - ArithmeticRightShiftAttribute = 13 - CondIfAttribute = 14 - WhileLoopAttribute = 15 - diff --git a/verif/tosa/AxisAttribute.py b/verif/tosa/AxisAttribute.py deleted file mode 100644 index d47eb81..0000000 --- a/verif/tosa/AxisAttribute.py +++ /dev/null @@ -1,45 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class AxisAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsAxisAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = AxisAttribute() - x.Init(buf, n + offset) - return x - - # AxisAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # AxisAttribute - def Axis(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 AxisAttributeStart(builder): builder.StartObject(1) -def AxisAttributeAddAxis(builder, axis): builder.PrependInt32Slot(0, axis, 0) -def AxisAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/ClampAttribute.py b/verif/tosa/ClampAttribute.py deleted file mode 100644 index ddc95cf..0000000 --- a/verif/tosa/ClampAttribute.py +++ /dev/null @@ -1,69 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class ClampAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsClampAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = ClampAttribute() - x.Init(buf, n + offset) - return x - - # ClampAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # ClampAttribute - def MinInt(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 - - # ClampAttribute - def MaxInt(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 - - # ClampAttribute - def MinFp(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) - return 0.0 - - # ClampAttribute - def MaxFp(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) - return 0.0 - -def ClampAttributeStart(builder): builder.StartObject(4) -def ClampAttributeAddMinInt(builder, minInt): builder.PrependInt32Slot(0, minInt, 0) -def ClampAttributeAddMaxInt(builder, maxInt): builder.PrependInt32Slot(1, maxInt, 0) -def ClampAttributeAddMinFp(builder, minFp): builder.PrependFloat32Slot(2, minFp, 0.0) -def ClampAttributeAddMaxFp(builder, maxFp): builder.PrependFloat32Slot(3, maxFp, 0.0) -def ClampAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/CondIfAttribute.py b/verif/tosa/CondIfAttribute.py deleted file mode 100644 index 0bf4566..0000000 --- a/verif/tosa/CondIfAttribute.py +++ /dev/null @@ -1,53 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class CondIfAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsCondIfAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = CondIfAttribute() - x.Init(buf, n + offset) - return x - - # CondIfAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # CondIfAttribute - def ThenBranch(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - - # CondIfAttribute - def ElseBranch(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - -def CondIfAttributeStart(builder): builder.StartObject(2) -def CondIfAttributeAddThenBranch(builder, thenBranch): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(thenBranch), 0) -def CondIfAttributeAddElseBranch(builder, elseBranch): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(elseBranch), 0) -def CondIfAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/Conv2dAttribute.py b/verif/tosa/Conv2dAttribute.py deleted file mode 100644 index c7861a5..0000000 --- a/verif/tosa/Conv2dAttribute.py +++ /dev/null @@ -1,109 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class Conv2dAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsConv2dAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Conv2dAttribute() - x.Init(buf, n + offset) - return x - - # Conv2dAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Conv2dAttribute - def Padding(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Conv2dAttribute - def PaddingAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # Conv2dAttribute - def PaddingLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # Conv2dAttribute - def Stride(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Conv2dAttribute - def StrideAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # Conv2dAttribute - def StrideLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # Conv2dAttribute - def Dilation(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Conv2dAttribute - def DilationAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # Conv2dAttribute - def DilationLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def Conv2dAttributeStart(builder): builder.StartObject(3) -def Conv2dAttributeAddPadding(builder, padding): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(padding), 0) -def Conv2dAttributeStartPaddingVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Conv2dAttributeAddStride(builder, stride): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(stride), 0) -def Conv2dAttributeStartStrideVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Conv2dAttributeAddDilation(builder, dilation): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(dilation), 0) -def Conv2dAttributeStartDilationVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Conv2dAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/ConvQuantInfo.py b/verif/tosa/ConvQuantInfo.py deleted file mode 100644 index a88bfa6..0000000 --- a/verif/tosa/ConvQuantInfo.py +++ /dev/null @@ -1,53 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class ConvQuantInfo(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsConvQuantInfo(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = ConvQuantInfo() - x.Init(buf, n + offset) - return x - - # ConvQuantInfo - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # ConvQuantInfo - def InputZp(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 - - # ConvQuantInfo - def WeightZp(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 ConvQuantInfoStart(builder): builder.StartObject(2) -def ConvQuantInfoAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0) -def ConvQuantInfoAddWeightZp(builder, weightZp): builder.PrependInt32Slot(1, weightZp, 0) -def ConvQuantInfoEnd(builder): return builder.EndObject() diff --git a/verif/tosa/CustomAttribute.py b/verif/tosa/CustomAttribute.py deleted file mode 100644 index 25f6759..0000000 --- a/verif/tosa/CustomAttribute.py +++ /dev/null @@ -1,45 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class CustomAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsCustomAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = CustomAttribute() - x.Init(buf, n + offset) - return x - - # CustomAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # CustomAttribute - def Identifier(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - -def CustomAttributeStart(builder): builder.StartObject(1) -def CustomAttributeAddIdentifier(builder, identifier): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(identifier), 0) -def CustomAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/DType.py b/verif/tosa/DType.py deleted file mode 100644 index 2e30531..0000000 --- a/verif/tosa/DType.py +++ /dev/null @@ -1,30 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020-2021, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -class DType(object): - UNKNOWN = 0 - BOOL = 1 - UINT8 = 2 - INT4 = 3 - INT8 = 4 - INT16 = 5 - INT32 = 6 - INT48 = 7 - FLOAT = 8 - diff --git a/verif/tosa/Format.py b/verif/tosa/Format.py deleted file mode 100644 index 5db4f27..0000000 --- a/verif/tosa/Format.py +++ /dev/null @@ -1,27 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -class Format(object): - UNKNOWN = 0 - NHWC = 1 - NDHWC = 2 - OHWI = 3 - HWIM = 4 - DOHWI = 5 - diff --git a/verif/tosa/MatMulQuantInfo.py b/verif/tosa/MatMulQuantInfo.py deleted file mode 100644 index b8390a9..0000000 --- a/verif/tosa/MatMulQuantInfo.py +++ /dev/null @@ -1,53 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class MatMulQuantInfo(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsMatMulQuantInfo(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = MatMulQuantInfo() - x.Init(buf, n + offset) - return x - - # MatMulQuantInfo - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # MatMulQuantInfo - def AZp(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 - - # MatMulQuantInfo - def BZp(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 MatMulQuantInfoStart(builder): builder.StartObject(2) -def MatMulQuantInfoAddAZp(builder, aZp): builder.PrependInt32Slot(0, aZp, 0) -def MatMulQuantInfoAddBZp(builder, bZp): builder.PrependInt32Slot(1, bZp, 0) -def MatMulQuantInfoEnd(builder): return builder.EndObject() diff --git a/verif/tosa/MulAttribute.py b/verif/tosa/MulAttribute.py deleted file mode 100644 index f45b285..0000000 --- a/verif/tosa/MulAttribute.py +++ /dev/null @@ -1,45 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class MulAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsMulAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = MulAttribute() - x.Init(buf, n + offset) - return x - - # MulAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # MulAttribute - def Shift(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 MulAttributeStart(builder): builder.StartObject(1) -def MulAttributeAddShift(builder, shift): builder.PrependInt32Slot(0, shift, 0) -def MulAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/Op.py b/verif/tosa/Op.py deleted file mode 100644 index ea9cdfe..0000000 --- a/verif/tosa/Op.py +++ /dev/null @@ -1,91 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -class Op(object): - UNKNOWN = 0 - ARGMAX = 1 - AVG_POOL2D = 2 - CONV2D = 3 - CONV3D = 4 - DEPTHWISE_CONV2D = 5 - FULLY_CONNECTED = 6 - MATMUL = 7 - MAX_POOL2D = 8 - TRANSPOSE_CONV2D = 9 - CLAMP = 10 - RELUN = 11 - SIGMOID = 12 - TANH = 13 - ADD = 14 - ARITHMETIC_RIGHT_SHIFT = 15 - BITWISE_AND = 16 - BITWISE_OR = 17 - BITWISE_XOR = 18 - LOGICAL_AND = 19 - LOGICAL_LEFT_SHIFT = 20 - LOGICAL_RIGHT_SHIFT = 21 - LOGICAL_OR = 22 - LOGICAL_XOR = 23 - MAXIMUM = 24 - MINIMUM = 25 - MUL = 26 - POW = 27 - SUB = 28 - TABLE = 29 - ABS = 30 - BITWISE_NOT = 31 - CEIL = 32 - CLZ = 33 - EXP = 34 - FLOOR = 35 - LOG = 36 - LOGICAL_NOT = 37 - NEGATE = 38 - RECIPROCAL = 39 - RSQRT = 40 - SELECT = 41 - EQUAL = 42 - GREATER = 43 - GREATER_EQUAL = 44 - REDUCE_ANY = 45 - REDUCE_ALL = 46 - REDUCE_MAX = 47 - REDUCE_MIN = 48 - REDUCE_PRODUCT = 49 - REDUCE_SUM = 50 - CONCAT = 51 - PAD = 52 - RESHAPE = 53 - REVERSE = 54 - SLICE = 55 - TILE = 56 - TRANSPOSE = 57 - GATHER = 58 - SCATTER = 59 - RESIZE = 60 - CAST = 61 - RESCALE = 62 - CONST = 63 - PLACEHOLDER = 64 - IDENTITY = 65 - IDENTITYN = 66 - CUSTOM = 67 - COND_IF = 68 - WHILE_LOOP = 69 - diff --git a/verif/tosa/PadQuantInfo.py b/verif/tosa/PadQuantInfo.py deleted file mode 100644 index df61926..0000000 --- a/verif/tosa/PadQuantInfo.py +++ /dev/null @@ -1,45 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class PadQuantInfo(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsPadQuantInfo(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = PadQuantInfo() - x.Init(buf, n + offset) - return x - - # PadQuantInfo - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # PadQuantInfo - def InputZp(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 PadQuantInfoStart(builder): builder.StartObject(1) -def PadQuantInfoAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0) -def PadQuantInfoEnd(builder): return builder.EndObject() diff --git a/verif/tosa/Pool2dAttribute.py b/verif/tosa/Pool2dAttribute.py deleted file mode 100644 index 1520de2..0000000 --- a/verif/tosa/Pool2dAttribute.py +++ /dev/null @@ -1,109 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class Pool2dAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsPool2dAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Pool2dAttribute() - x.Init(buf, n + offset) - return x - - # Pool2dAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Pool2dAttribute - def Padding(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Pool2dAttribute - def PaddingAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # Pool2dAttribute - def PaddingLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # Pool2dAttribute - def Kernel(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Pool2dAttribute - def KernelAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # Pool2dAttribute - def KernelLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # Pool2dAttribute - def Stride(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Pool2dAttribute - def StrideAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # Pool2dAttribute - def StrideLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def Pool2dAttributeStart(builder): builder.StartObject(3) -def Pool2dAttributeAddPadding(builder, padding): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(padding), 0) -def Pool2dAttributeStartPaddingVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Pool2dAttributeAddKernel(builder, kernel): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(kernel), 0) -def Pool2dAttributeStartKernelVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Pool2dAttributeAddStride(builder, stride): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(stride), 0) -def Pool2dAttributeStartStrideVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Pool2dAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/QuantInfo.py b/verif/tosa/QuantInfo.py deleted file mode 100644 index 0544cce..0000000 --- a/verif/tosa/QuantInfo.py +++ /dev/null @@ -1,26 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -class QuantInfo(object): - NONE = 0 - UnaryQuantInfo = 1 - ConvQuantInfo = 2 - MatMulQuantInfo = 3 - PadQuantInfo = 4 - diff --git a/verif/tosa/README.md b/verif/tosa/README.md deleted file mode 100644 index de8c1f9..0000000 --- a/verif/tosa/README.md +++ /dev/null @@ -1,14 +0,0 @@ -TOSA FlatBuffers python serialization library -============================================= - -Files in this directory are automatically generated by running: - -``` bash -../build/thirdparty/flatbuffers/flatc --python ../serialization/tosa.fbs -``` - -From the ``verif/`` directory. Flatc is compiled along with the *TOSA -Reference Model*. - -*Because they are automatically generated, please do not edit the -python files in this directory by hand.* diff --git a/verif/tosa/ReluNAttribute.py b/verif/tosa/ReluNAttribute.py deleted file mode 100644 index e446c03..0000000 --- a/verif/tosa/ReluNAttribute.py +++ /dev/null @@ -1,53 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class ReluNAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsReluNAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = ReluNAttribute() - x.Init(buf, n + offset) - return x - - # ReluNAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # ReluNAttribute - def MaxInt(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 - - # ReluNAttribute - def MaxFp(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Float32Flags, o + self._tab.Pos) - return 0.0 - -def ReluNAttributeStart(builder): builder.StartObject(2) -def ReluNAttributeAddMaxInt(builder, maxInt): builder.PrependInt32Slot(0, maxInt, 0) -def ReluNAttributeAddMaxFp(builder, maxFp): builder.PrependFloat32Slot(1, maxFp, 0.0) -def ReluNAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/RescaleAttribute.py b/verif/tosa/RescaleAttribute.py deleted file mode 100644 index 0ec8c2b..0000000 --- a/verif/tosa/RescaleAttribute.py +++ /dev/null @@ -1,125 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class RescaleAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsRescaleAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = RescaleAttribute() - x.Init(buf, n + offset) - return x - - # RescaleAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # RescaleAttribute - def InputZp(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 - - # RescaleAttribute - def OutputZp(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 - - # RescaleAttribute - def Multiplier(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # RescaleAttribute - def MultiplierAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # RescaleAttribute - def MultiplierLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # RescaleAttribute - def Shift(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # RescaleAttribute - def ShiftAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # RescaleAttribute - def ShiftLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # RescaleAttribute - def Scale32(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) - return False - - # RescaleAttribute - def DoubleRound(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) - if o != 0: - return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) - return False - - # RescaleAttribute - def PerChannel(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) - if o != 0: - return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) - return False - -def RescaleAttributeStart(builder): builder.StartObject(7) -def RescaleAttributeAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0) -def RescaleAttributeAddOutputZp(builder, outputZp): builder.PrependInt32Slot(1, outputZp, 0) -def RescaleAttributeAddMultiplier(builder, multiplier): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(multiplier), 0) -def RescaleAttributeStartMultiplierVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def RescaleAttributeAddShift(builder, shift): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(shift), 0) -def RescaleAttributeStartShiftVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def RescaleAttributeAddScale32(builder, scale32): builder.PrependBoolSlot(4, scale32, 0) -def RescaleAttributeAddDoubleRound(builder, doubleRound): builder.PrependBoolSlot(5, doubleRound, 0) -def RescaleAttributeAddPerChannel(builder, perChannel): builder.PrependBoolSlot(6, perChannel, 0) -def RescaleAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/ReshapeAttribute.py b/verif/tosa/ReshapeAttribute.py deleted file mode 100644 index 2c50cef..0000000 --- a/verif/tosa/ReshapeAttribute.py +++ /dev/null @@ -1,61 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class ReshapeAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsReshapeAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = ReshapeAttribute() - x.Init(buf, n + offset) - return x - - # ReshapeAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # ReshapeAttribute - def Shape(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # ReshapeAttribute - def ShapeAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # ReshapeAttribute - def ShapeLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def ReshapeAttributeStart(builder): builder.StartObject(1) -def ReshapeAttributeAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) -def ReshapeAttributeStartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ReshapeAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/ResizeAttribute.py b/verif/tosa/ResizeAttribute.py deleted file mode 100644 index 35be73a..0000000 --- a/verif/tosa/ResizeAttribute.py +++ /dev/null @@ -1,173 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class ResizeAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsResizeAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = ResizeAttribute() - x.Init(buf, n + offset) - return x - - # ResizeAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # ResizeAttribute - def OutputSize(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # ResizeAttribute - def OutputSizeAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # ResizeAttribute - def OutputSizeLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # ResizeAttribute - def Stride(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # ResizeAttribute - def StrideAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # ResizeAttribute - def StrideLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # ResizeAttribute - def Offset(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # ResizeAttribute - def OffsetAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # ResizeAttribute - def OffsetLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # ResizeAttribute - def Shift(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 - - # ResizeAttribute - def StrideFp(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Float32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # ResizeAttribute - def StrideFpAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float32Flags, o) - return 0 - - # ResizeAttribute - def StrideFpLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # ResizeAttribute - def OffsetFp(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Float32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # ResizeAttribute - def OffsetFpAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float32Flags, o) - return 0 - - # ResizeAttribute - def OffsetFpLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # ResizeAttribute - def Mode(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) - return 0 - -def ResizeAttributeStart(builder): builder.StartObject(7) -def ResizeAttributeAddOutputSize(builder, outputSize): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(outputSize), 0) -def ResizeAttributeStartOutputSizeVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ResizeAttributeAddStride(builder, stride): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(stride), 0) -def ResizeAttributeStartStrideVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ResizeAttributeAddOffset(builder, offset): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(offset), 0) -def ResizeAttributeStartOffsetVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ResizeAttributeAddShift(builder, shift): builder.PrependInt32Slot(3, shift, 0) -def ResizeAttributeAddStrideFp(builder, strideFp): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(strideFp), 0) -def ResizeAttributeStartStrideFpVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ResizeAttributeAddOffsetFp(builder, offsetFp): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(offsetFp), 0) -def ResizeAttributeStartOffsetFpVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def ResizeAttributeAddMode(builder, mode): builder.PrependUint32Slot(6, mode, 0) -def ResizeAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/ResizeMode.py b/verif/tosa/ResizeMode.py deleted file mode 100644 index 02bed51..0000000 --- a/verif/tosa/ResizeMode.py +++ /dev/null @@ -1,24 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -class ResizeMode(object): - UNKNOWN = 0 - NEAREST = 1 - BILINEAR = 2 - diff --git a/verif/tosa/SliceAttribute.py b/verif/tosa/SliceAttribute.py deleted file mode 100644 index d156a4a..0000000 --- a/verif/tosa/SliceAttribute.py +++ /dev/null @@ -1,85 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class SliceAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsSliceAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = SliceAttribute() - x.Init(buf, n + offset) - return x - - # SliceAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # SliceAttribute - def Begin(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # SliceAttribute - def BeginAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # SliceAttribute - def BeginLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # SliceAttribute - def Size(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # SliceAttribute - def SizeAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # SliceAttribute - def SizeLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def SliceAttributeStart(builder): builder.StartObject(2) -def SliceAttributeAddBegin(builder, begin): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(begin), 0) -def SliceAttributeStartBeginVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SliceAttributeAddSize(builder, size): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(size), 0) -def SliceAttributeStartSizeVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def SliceAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/TileAttribute.py b/verif/tosa/TileAttribute.py deleted file mode 100644 index 6385edd..0000000 --- a/verif/tosa/TileAttribute.py +++ /dev/null @@ -1,61 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class TileAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsTileAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = TileAttribute() - x.Init(buf, n + offset) - return x - - # TileAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # TileAttribute - def Multiples(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TileAttribute - def MultiplesAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # TileAttribute - def MultiplesLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def TileAttributeStart(builder): builder.StartObject(1) -def TileAttributeAddMultiples(builder, multiples): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(multiples), 0) -def TileAttributeStartMultiplesVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TileAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/TosaBasicBlock.py b/verif/tosa/TosaBasicBlock.py deleted file mode 100644 index 42a7379..0000000 --- a/verif/tosa/TosaBasicBlock.py +++ /dev/null @@ -1,123 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class TosaBasicBlock(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsTosaBasicBlock(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = TosaBasicBlock() - x.Init(buf, n + offset) - return x - - # TosaBasicBlock - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # TosaBasicBlock - def Name(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - - # TosaBasicBlock - def Operators(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - x = self._tab.Vector(o) - x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 - x = self._tab.Indirect(x) - from .TosaOperator import TosaOperator - obj = TosaOperator() - obj.Init(self._tab.Bytes, x) - return obj - return None - - # TosaBasicBlock - def OperatorsLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaBasicBlock - def Tensors(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - x = self._tab.Vector(o) - x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 - x = self._tab.Indirect(x) - from .TosaTensor import TosaTensor - obj = TosaTensor() - obj.Init(self._tab.Bytes, x) - return obj - return None - - # TosaBasicBlock - def TensorsLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaBasicBlock - def Inputs(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return "" - - # TosaBasicBlock - def InputsLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaBasicBlock - def Outputs(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return "" - - # TosaBasicBlock - def OutputsLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def TosaBasicBlockStart(builder): builder.StartObject(5) -def TosaBasicBlockAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) -def TosaBasicBlockAddOperators(builder, operators): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(operators), 0) -def TosaBasicBlockStartOperatorsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaBasicBlockAddTensors(builder, tensors): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(tensors), 0) -def TosaBasicBlockStartTensorsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaBasicBlockAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) -def TosaBasicBlockStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaBasicBlockAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) -def TosaBasicBlockStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaBasicBlockEnd(builder): return builder.EndObject() diff --git a/verif/tosa/TosaGraph.py b/verif/tosa/TosaGraph.py deleted file mode 100644 index 92568b9..0000000 --- a/verif/tosa/TosaGraph.py +++ /dev/null @@ -1,71 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class TosaGraph(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsTosaGraph(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = TosaGraph() - x.Init(buf, n + offset) - return x - - # TosaGraph - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # TosaGraph - def Version(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - x = self._tab.Indirect(o + self._tab.Pos) - from .Version import Version - obj = Version() - obj.Init(self._tab.Bytes, x) - return obj - return None - - # TosaGraph - def Blocks(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - x = self._tab.Vector(o) - x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 - x = self._tab.Indirect(x) - from .TosaBasicBlock import TosaBasicBlock - obj = TosaBasicBlock() - obj.Init(self._tab.Bytes, x) - return obj - return None - - # TosaGraph - def BlocksLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def TosaGraphStart(builder): builder.StartObject(2) -def TosaGraphAddVersion(builder, version): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(version), 0) -def TosaGraphAddBlocks(builder, blocks): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(blocks), 0) -def TosaGraphStartBlocksVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaGraphEnd(builder): return builder.EndObject() diff --git a/verif/tosa/TosaOperator.py b/verif/tosa/TosaOperator.py deleted file mode 100644 index ab4a160..0000000 --- a/verif/tosa/TosaOperator.py +++ /dev/null @@ -1,117 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class TosaOperator(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsTosaOperator(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = TosaOperator() - x.Init(buf, n + offset) - return x - - # TosaOperator - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # TosaOperator - def Op(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) - return 0 - - # TosaOperator - def AttributeType(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) - return 0 - - # TosaOperator - def Attribute(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - from flatbuffers.table import Table - obj = Table(bytearray(), 0) - self._tab.Union(obj, o) - return obj - return None - - # TosaOperator - def Inputs(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return "" - - # TosaOperator - def InputsLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaOperator - def Outputs(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.String(a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return "" - - # TosaOperator - def OutputsLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaOperator - def QuantInfoType(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) - return 0 - - # TosaOperator - def QuantInfo(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) - if o != 0: - from flatbuffers.table import Table - obj = Table(bytearray(), 0) - self._tab.Union(obj, o) - return obj - return None - -def TosaOperatorStart(builder): builder.StartObject(7) -def TosaOperatorAddOp(builder, op): builder.PrependUint32Slot(0, op, 0) -def TosaOperatorAddAttributeType(builder, attributeType): builder.PrependUint8Slot(1, attributeType, 0) -def TosaOperatorAddAttribute(builder, attribute): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(attribute), 0) -def TosaOperatorAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(inputs), 0) -def TosaOperatorStartInputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaOperatorAddOutputs(builder, outputs): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(outputs), 0) -def TosaOperatorStartOutputsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaOperatorAddQuantInfoType(builder, quantInfoType): builder.PrependUint8Slot(5, quantInfoType, 0) -def TosaOperatorAddQuantInfo(builder, quantInfo): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(quantInfo), 0) -def TosaOperatorEnd(builder): return builder.EndObject() diff --git a/verif/tosa/TosaTensor.py b/verif/tosa/TosaTensor.py deleted file mode 100644 index 0b30266..0000000 --- a/verif/tosa/TosaTensor.py +++ /dev/null @@ -1,133 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class TosaTensor(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsTosaTensor(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = TosaTensor() - x.Init(buf, n + offset) - return x - - # TosaTensor - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # TosaTensor - def Name(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - - # TosaTensor - def Shape(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TosaTensor - def ShapeAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # TosaTensor - def ShapeLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaTensor - def Type(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) - return 0 - - # TosaTensor - def Usage(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Uint32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TosaTensor - def UsageAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint32Flags, o) - return 0 - - # TosaTensor - def UsageLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaTensor - def Format(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Uint32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TosaTensor - def FormatAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint32Flags, o) - return 0 - - # TosaTensor - def FormatLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TosaTensor - def NpyFilename(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - -def TosaTensorStart(builder): builder.StartObject(6) -def TosaTensorAddName(builder, name): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(name), 0) -def TosaTensorAddShape(builder, shape): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(shape), 0) -def TosaTensorStartShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaTensorAddType(builder, type): builder.PrependUint32Slot(2, type, 0) -def TosaTensorAddUsage(builder, usage): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(usage), 0) -def TosaTensorStartUsageVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaTensorAddFormat(builder, format): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(format), 0) -def TosaTensorStartFormatVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TosaTensorAddNpyFilename(builder, npyFilename): builder.PrependUOffsetTRelativeSlot(5, flatbuffers.number_types.UOffsetTFlags.py_type(npyFilename), 0) -def TosaTensorEnd(builder): return builder.EndObject() diff --git a/verif/tosa/TransposeConv2dAttribute.py b/verif/tosa/TransposeConv2dAttribute.py deleted file mode 100644 index 043d8e8..0000000 --- a/verif/tosa/TransposeConv2dAttribute.py +++ /dev/null @@ -1,133 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class TransposeConv2dAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsTransposeConv2dAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = TransposeConv2dAttribute() - x.Init(buf, n + offset) - return x - - # TransposeConv2dAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # TransposeConv2dAttribute - def Outpad(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TransposeConv2dAttribute - def OutpadAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # TransposeConv2dAttribute - def OutpadLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TransposeConv2dAttribute - def Stride(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TransposeConv2dAttribute - def StrideAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # TransposeConv2dAttribute - def StrideLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TransposeConv2dAttribute - def Dilation(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TransposeConv2dAttribute - def DilationAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # TransposeConv2dAttribute - def DilationLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # TransposeConv2dAttribute - def OutputShape(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # TransposeConv2dAttribute - def OutputShapeAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # TransposeConv2dAttribute - def OutputShapeLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def TransposeConv2dAttributeStart(builder): builder.StartObject(4) -def TransposeConv2dAttributeAddOutpad(builder, outpad): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(outpad), 0) -def TransposeConv2dAttributeStartOutpadVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TransposeConv2dAttributeAddStride(builder, stride): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(stride), 0) -def TransposeConv2dAttributeStartStrideVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TransposeConv2dAttributeAddDilation(builder, dilation): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(dilation), 0) -def TransposeConv2dAttributeStartDilationVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TransposeConv2dAttributeAddOutputShape(builder, outputShape): builder.PrependUOffsetTRelativeSlot(3, flatbuffers.number_types.UOffsetTFlags.py_type(outputShape), 0) -def TransposeConv2dAttributeStartOutputShapeVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def TransposeConv2dAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/UnaryQuantInfo.py b/verif/tosa/UnaryQuantInfo.py deleted file mode 100644 index 9ae0214..0000000 --- a/verif/tosa/UnaryQuantInfo.py +++ /dev/null @@ -1,53 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class UnaryQuantInfo(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsUnaryQuantInfo(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = UnaryQuantInfo() - x.Init(buf, n + offset) - return x - - # UnaryQuantInfo - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # UnaryQuantInfo - def InputZp(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 - - # UnaryQuantInfo - def OutputZp(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 UnaryQuantInfoStart(builder): builder.StartObject(2) -def UnaryQuantInfoAddInputZp(builder, inputZp): builder.PrependInt32Slot(0, inputZp, 0) -def UnaryQuantInfoAddOutputZp(builder, outputZp): builder.PrependInt32Slot(1, outputZp, 0) -def UnaryQuantInfoEnd(builder): return builder.EndObject() diff --git a/verif/tosa/Usage.py b/verif/tosa/Usage.py deleted file mode 100644 index 4c42daa..0000000 --- a/verif/tosa/Usage.py +++ /dev/null @@ -1,25 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -class Usage(object): - UNKNOWN = 0 - ACTIVATION = 1 - WEIGHT = 2 - INDEX = 3 - diff --git a/verif/tosa/Version.py b/verif/tosa/Version.py deleted file mode 100644 index e327507..0000000 --- a/verif/tosa/Version.py +++ /dev/null @@ -1,69 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class Version(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsVersion(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Version() - x.Init(buf, n + offset) - return x - - # Version - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Version - def _major(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 - - # Version - def _minor(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 21 - - # Version - def _patch(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 - - # Version - def _experimental(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) - return False - -def VersionStart(builder): builder.StartObject(4) -def VersionAdd_major(builder, Major): builder.PrependInt32Slot(0, Major, 0) -def VersionAdd_minor(builder, Minor): builder.PrependInt32Slot(1, Minor, 21) -def VersionAdd_patch(builder, Patch): builder.PrependInt32Slot(2, Patch, 0) -def VersionAdd_experimental(builder, Experimental): builder.PrependBoolSlot(3, Experimental, 0) -def VersionEnd(builder): return builder.EndObject() diff --git a/verif/tosa/WhileLoopAttribute.py b/verif/tosa/WhileLoopAttribute.py deleted file mode 100644 index c37977f..0000000 --- a/verif/tosa/WhileLoopAttribute.py +++ /dev/null @@ -1,53 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -# namespace: tosa - -import flatbuffers - -class WhileLoopAttribute(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsWhileLoopAttribute(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = WhileLoopAttribute() - x.Init(buf, n + offset) - return x - - # WhileLoopAttribute - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # WhileLoopAttribute - def CondBranch(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - - # WhileLoopAttribute - def BodyBranch(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.String(o + self._tab.Pos) - return None - -def WhileLoopAttributeStart(builder): builder.StartObject(2) -def WhileLoopAttributeAddCondBranch(builder, condBranch): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(condBranch), 0) -def WhileLoopAttributeAddBodyBranch(builder, bodyBranch): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(bodyBranch), 0) -def WhileLoopAttributeEnd(builder): return builder.EndObject() diff --git a/verif/tosa/__init__.py b/verif/tosa/__init__.py deleted file mode 100644 index ee1ab30..0000000 --- a/verif/tosa/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ - -# Copyright (c) 2020, ARM Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - |