From 0b6d7c271af1e6593e6a2cf14b32acea765f4b64 Mon Sep 17 00:00:00 2001
From: Tai Ly <tai.ly@arm.com>
Date: Fri, 8 Mar 2024 17:03:25 +0000
Subject: [serialization_lib] Fix Clamp and Pad Attributes

This patch implements following changes to attribute fields:
- PadAttribute: delete padding field, replace pad_const_int
	and pad_const_fp fields by pad_const, a field of
	ubyte array
- ClampAttribute: replace min_int, max_int, min_fp and max_fp
	fields by min_val and max_val, fields of ubyte arrays
- RescaleAttribute: delete multiplier and shift fields

Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: I5b075d29677cffca9ff2292708141d48410e7e72
---
 include/attribute.def | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

(limited to 'include/attribute.def')

diff --git a/include/attribute.def b/include/attribute.def
index b6ff3c2..2176f47 100644
--- a/include/attribute.def
+++ b/include/attribute.def
@@ -1,5 +1,5 @@
 
-// Copyright (c) 2020-2023, ARM Limited.
+// Copyright (c) 2020-2024, ARM Limited.
 //
 //    Licensed under the Apache License, Version 2.0 (the "License");
 //    you may not use this file except in compliance with the License.
@@ -50,10 +50,8 @@ DEF_ATTRIBUTE(TransposeConv, 6,
               int32_t, S, weight_zp,
               bool,    S, local_bound)
 
-DEF_ATTRIBUTE(Pad, 3,
-              int32_t, V, padding,
-              int32_t, S, pad_const_int,
-              float, S, pad_const_fp)
+DEF_ATTRIBUTE(Pad, 1,
+              uint8_t, V, pad_const)
 
 DEF_ATTRIBUTE(Axis, 1,
               int32_t, S, axis)
@@ -64,17 +62,13 @@ DEF_ATTRIBUTE(Resize, 4,
               int16_t, V, border,
               ResizeMode, S, mode)
 
-DEF_ATTRIBUTE(Clamp, 4,
-              int32_t, S, min_int,
-              int32_t, S, max_int,
-              float, S, min_fp,
-              float, S, max_fp)
+DEF_ATTRIBUTE(Clamp, 2,
+              uint8_t, V, min_val,
+              uint8_t, V, max_val)
 
-DEF_ATTRIBUTE(Rescale, 9,
+DEF_ATTRIBUTE(Rescale, 7,
               int32_t, S, input_zp,
               int32_t, S, output_zp,
-              int32_t, V, multiplier,
-              int32_t, V, shift,
               bool, S, scale32,
               bool, S, double_round,
               bool, S, per_channel,
-- 
cgit v1.2.1

