diff options
author | Tai Ly <tai.ly@arm.com> | 2024-03-13 18:52:45 +0000 |
---|---|---|
committer | Tai Ly <tai.ly@arm.com> | 2024-03-13 19:25:43 +0000 |
commit | ad78daaf0fa1e41742cbed314459c3dbbb483c20 (patch) | |
tree | f27e56f497b796d36676b42bb713deb1af883a31 /python/serializer/tosa_serializer.py | |
parent | 0b6d7c271af1e6593e6a2cf14b32acea765f4b64 (diff) | |
download | serialization_lib-ad78daaf0fa1e41742cbed314459c3dbbb483c20.tar.gz |
[serialization_lib] Add acc_type to Conv Attrs
This adds acc_type to ConvAttribute and TransposeConvAttribute
Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: I73bab71b2eb90f6451fadee21d5bed1811ecbfd7
Diffstat (limited to 'python/serializer/tosa_serializer.py')
-rw-r--r-- | python/serializer/tosa_serializer.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/python/serializer/tosa_serializer.py b/python/serializer/tosa_serializer.py index 2c7996a..9658edf 100644 --- a/python/serializer/tosa_serializer.py +++ b/python/serializer/tosa_serializer.py @@ -172,7 +172,9 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.ints.append((a.AddOutputZp, output_zp)) self.ints.append((a.AddAccType, acc_type)) - def ConvAttribute(self, pad, stride, dilation, input_zp, weight_zp, local_bound): + def ConvAttribute( + self, pad, stride, dilation, input_zp, weight_zp, local_bound, acc_type + ): from tosa import ConvAttribute as a, Attribute self.utype = Attribute.Attribute().ConvAttribute @@ -184,9 +186,10 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.ints.append((a.AddInputZp, input_zp)) self.ints.append((a.AddWeightZp, weight_zp)) self.bools.append((a.AddLocalBound, local_bound)) + self.ints.append((a.AddAccType, acc_type)) def TransposeConvAttribute( - self, outpad, stride, output_shape, input_zp, weight_zp, local_bound + self, outpad, stride, output_shape, input_zp, weight_zp, local_bound, acc_type ): from tosa import TransposeConvAttribute as a, Attribute @@ -199,6 +202,7 @@ class TosaSerializerAttribute(TosaSerializerUnion): self.ints.append((a.AddInputZp, input_zp)) self.ints.append((a.AddWeightZp, weight_zp)) self.bools.append((a.AddLocalBound, local_bound)) + self.ints.append((a.AddAccType, acc_type)) def PadAttribute(self, serializer_builder, pad_const_val_as_bytes): from tosa import PadAttribute as a, Attribute |