From 6b078cac3ff2b33fd6d01c5e849424fbd9b2ac58 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Wed, 13 Oct 2021 23:12:50 -0700 Subject: Fix bug when serializing INT32 constant data Signed-off-by: Kevin Cheng Change-Id: I5321aedb5766dd1b38fa8251ffb84fa880d4ecd5 --- python/tosa_serializer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tosa_serializer.py b/python/tosa_serializer.py index b1c5dae..04b2fc4 100644 --- a/python/tosa_serializer.py +++ b/python/tosa_serializer.py @@ -414,7 +414,7 @@ class TosaSerializerTensor: b0 = val_u32 & ByteMask b1 = (val_u32 >> np.uint32(8)) & ByteMask b2 = (val_u32 >> np.uint32(16)) & ByteMask - b3 = (val_u32 >> np.uint32(32)) & ByteMask + b3 = (val_u32 >> np.uint32(24)) & ByteMask u8_data.extend([b0, b1, b2, b3]) elif self.dtype == DType.INT48: for val in self.data: -- cgit v1.2.1