diff options
author | James Ward <james.ward@arm.com> | 2023-01-20 16:03:50 +0000 |
---|---|---|
committer | James Ward <james.ward@arm.com> | 2023-01-23 18:23:02 +0000 |
commit | ea00fd0f76c39c650eececc1d640126584357095 (patch) | |
tree | 32807a6fd39a7eaa9c5d3843f03cc0122959b4c4 /python/serializer | |
parent | c15f7d52aa4f360eba2344449baa418b7608ac7c (diff) | |
download | serialization_lib-ea00fd0f76c39c650eececc1d640126584357095.tar.gz |
Remove accumulator attributes from all but AVG_POOL2D
* Also add missing CustomAttribute.py (flatbuffers generated file)
Signed-off-by: James Ward <james.ward@arm.com>
Change-Id: Ib71847e03d622995dd86afcb6ec9ed2bc147ee7a
Diffstat (limited to 'python/serializer')
-rw-r--r-- | python/serializer/tosa_serializer.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/python/serializer/tosa_serializer.py b/python/serializer/tosa_serializer.py index f579df2..b22cb20 100644 --- a/python/serializer/tosa_serializer.py +++ b/python/serializer/tosa_serializer.py @@ -170,7 +170,7 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.ints.append((a.AddOutputZp, output_zp)) self.ints.append((a.AddAccumDtype, accum_dtype)) - def ConvAttribute(self, pad, stride, dilation, input_zp, weight_zp, accum_dtype): + def ConvAttribute(self, pad, stride, dilation, input_zp, weight_zp): from tosa import ConvAttribute as a, Attribute self.utype = Attribute.Attribute().ConvAttribute @@ -181,11 +181,8 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.intvecs.append((a.AddDilation, dilation)) self.ints.append((a.AddInputZp, input_zp)) self.ints.append((a.AddWeightZp, weight_zp)) - self.ints.append((a.AddAccumDtype, accum_dtype)) - def TransposeConvAttribute( - self, outpad, stride, output_shape, input_zp, weight_zp, accum_dtype - ): + def TransposeConvAttribute(self, outpad, stride, output_shape, input_zp, weight_zp): from tosa import TransposeConvAttribute as a, Attribute self.utype = Attribute.Attribute().TransposeConvAttribute @@ -196,7 +193,6 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.intvecs.append((a.AddOutputShape, output_shape)) self.ints.append((a.AddInputZp, input_zp)) self.ints.append((a.AddWeightZp, weight_zp)) - self.ints.append((a.AddAccumDtype, accum_dtype)) def PadAttribute(self, serializer_builder, padding, pad_const_int, pad_const_fp): from tosa import PadAttribute as a, Attribute @@ -350,7 +346,7 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.intvecs.append((a.AddTable, table)) - def MatMulAttribute(self, A_zp, B_zp, accum_dtype): + def MatMulAttribute(self, A_zp, B_zp): from tosa import MatMulAttribute as a, Attribute self.utype = Attribute.Attribute().MatMulAttribute @@ -358,9 +354,8 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.ints.append((a.AddAZp, A_zp)) self.ints.append((a.AddBZp, B_zp)) - self.ints.append((a.AddAccumDtype, accum_dtype)) - def FullyConnectedAttribute(self, input_zp, weight_zp, accum_dtype): + def FullyConnectedAttribute(self, input_zp, weight_zp): from tosa import FullyConnectedAttribute as a, Attribute self.utype = Attribute.Attribute().FullyConnectedAttribute @@ -368,7 +363,6 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.ints.append((a.AddInputZp, input_zp)) self.ints.append((a.AddWeightZp, weight_zp)) - self.ints.append((a.AddAccumDtype, accum_dtype)) def NegateAttribute(self, input1_zp, output_zp): from tosa import NegateAttribute as a, Attribute |