From 9fe5e964e2193f0e345670f7f4098beecd7fd6eb Mon Sep 17 00:00:00 2001 From: Dominic Symes Date: Fri, 9 Feb 2024 13:35:33 +0000 Subject: 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 Change-Id: I8e547f18ec1c36e0e9e3f8db04e58b0f643c781c --- pseudocode/operators/RESCALE.tosac | 6 ++++-- 1 file 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(input, shape, index); -- cgit v1.2.1