aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ward <james.ward@arm.com>2023-11-21 18:14:43 +0000
committerJames Ward <james.ward@arm.com>2023-11-21 19:06:54 +0000
commit92358fc122cba98e373ca2ff42b1cfe7618161e8 (patch)
tree3b380c59e080be2dd448e8ffedd37ae23631ad5f
parentf5dfad14f0cdc9556785b610674350c2e5a33553 (diff)
downloadserialization_lib-92358fc122cba98e373ca2ff42b1cfe7618161e8.tar.gz
Add Rescale Attribute changes
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: Ifc5445c7129abb914a6cef952e27fccf47ea6397
-rw-r--r--python/serializer/tosa_serializer.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/python/serializer/tosa_serializer.py b/python/serializer/tosa_serializer.py
index 563bc00..1b40723 100644
--- a/python/serializer/tosa_serializer.py
+++ b/python/serializer/tosa_serializer.py
@@ -283,7 +283,16 @@ class TosaSerializerAttribute(TosaSerializerUnion):
self.floats.append((a.AddMaxFp, serialized_maxfp_bytes))
def RescaleAttribute(
- self, input_zp, output_zp, multiplier, shift, scale32, double_round, per_channel
+ self,
+ input_zp,
+ output_zp,
+ multiplier,
+ shift,
+ scale32,
+ double_round,
+ per_channel,
+ input_unsigned,
+ output_unsigned,
):
from tosa import RescaleAttribute as a, Attribute
@@ -297,6 +306,8 @@ class TosaSerializerAttribute(TosaSerializerUnion):
self.bools.append((a.AddScale32, scale32))
self.bools.append((a.AddDoubleRound, double_round))
self.bools.append((a.AddPerChannel, per_channel))
+ self.bools.append((a.AddInputUnsigned, input_unsigned))
+ self.bools.append((a.AddOutputUnsigned, output_unsigned))
def MulAttribute(self, shift):
from tosa import MulAttribute as a, Attribute