aboutsummaryrefslogtreecommitdiff
path: root/python/tosa/TosaOperator.py
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2022-06-07 05:17:37 +0000
committerEric Kunze <eric.kunze@arm.com>2022-06-15 08:30:47 -0700
commitbdcc3fee1b8bf55aac50e060115b92a1ccf9741c (patch)
tree05951f3fd1b9e42f859e999976715e6e673acb15 /python/tosa/TosaOperator.py
parenta336d54aca08b06953a8b6c49d7e5f6c4899952e (diff)
downloadserialization_lib-bdcc3fee1b8bf55aac50e060115b92a1ccf9741c.tar.gz
Remove quantinfo types
Any needed information has been moved into the attributes for each operator. This aligns with the structure of the attributes in the TOSA specification, and generally simplifies the code. Change-Id: I8243e91b09de1a9115f8af09c5e7def7e8f2866b Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Diffstat (limited to 'python/tosa/TosaOperator.py')
-rw-r--r--python/tosa/TosaOperator.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/python/tosa/TosaOperator.py b/python/tosa/TosaOperator.py
index 040c2dc..fd11f76 100644
--- a/python/tosa/TosaOperator.py
+++ b/python/tosa/TosaOperator.py
@@ -88,24 +88,7 @@ class TosaOperator(object):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12))
return o == 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 TosaOperatorStart(builder): builder.StartObject(5)
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)
@@ -113,6 +96,4 @@ def TosaOperatorAddInputs(builder, inputs): builder.PrependUOffsetTRelativeSlot(
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()