From ea00fd0f76c39c650eececc1d640126584357095 Mon Sep 17 00:00:00 2001 From: James Ward Date: Fri, 20 Jan 2023 16:03:50 +0000 Subject: Remove accumulator attributes from all but AVG_POOL2D * Also add missing CustomAttribute.py (flatbuffers generated file) Signed-off-by: James Ward Change-Id: Ib71847e03d622995dd86afcb6ec9ed2bc147ee7a --- python/serializer/tosa_serializer.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'python/serializer/tosa_serializer.py') 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 -- cgit v1.2.1