aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominic Symes <dominic.symes@arm.com>2024-02-09 13:35:33 +0000
committerDominic Symes <dominic.symes@arm.com>2024-02-14 14:50:26 +0000
commit9fe5e964e2193f0e345670f7f4098beecd7fd6eb (patch)
treeae5f126084b5a31379d2ef41e923a3db7095eebb
parent31c08c59085fe3a9002bcd97cc6d886ad2ba9e6e (diff)
downloadspecification-9fe5e964e2193f0e345670f7f4098beecd7fd6eb.tar.gz
RESCALE: Correct sign checks
Moving between TOSA version 0.70 and 0.80, some of the checks between input and output type were omitted. Signed-off-by: Dominic Symes <dominic.symes@arm.com> Change-Id: I8e547f18ec1c36e0e9e3f8db04e58b0f643c781c
-rw-r--r--pseudocode/operators/RESCALE.tosac6
1 files changed, 4 insertions, 2 deletions
diff --git a/pseudocode/operators/RESCALE.tosac b/pseudocode/operators/RESCALE.tosac
index b13a5ad..0a3ce8d 100644
--- a/pseudocode/operators/RESCALE.tosac
+++ b/pseudocode/operators/RESCALE.tosac
@@ -19,8 +19,10 @@ for_each(index in shape) {
ERROR_IF(out_t == i16_t && output_unsigned == true && output_zp != 0 && output_zp != 32768);
ERROR_IF(scale32 && in_t == i48_t);
ERROR_IF(!scale32 && double_round);
- ERROR_IF(in_t == i16_t && out_t == i32_t && input_unsigned);
- ERROR_IF(in_t == i32_t && out_t == i16_t && output_unsigned);
+ ERROR_IF(input_unsigned && output_unsigned);
+ ERROR_IF(out_t == i32_t && input_unsigned);
+ ERROR_IF(in_t == i32_t && output_unsigned);
+ ERROR_IF(in_t == i48_t && output_unsigned);
in_t in_value = tensor_read<in_t>(input, shape, index);