aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Kunze <eric.kunze@arm.com>2024-04-12 16:03:52 -0700
committerEric Kunze <eric.kunze@arm.com>2024-04-17 23:56:37 +0000
commit7ad78d37a51f8b333367effe62d596ac89cdcdb5 (patch)
tree780fc6db0e3737b7cd4108b4b9e13b2392a83051
parent132acad52654a72d638faeaed8dc1488d5b1fe15 (diff)
downloadspecification-7ad78d37a51f8b333367effe62d596ac89cdcdb5.tar.gz
Disallow per channel RESCALE if rank < 1
per channel rescaling doesn't make sense for a rank 0 input. Signed-off-by: Eric Kunze <eric.kunze@arm.com> Change-Id: Icfa58403953c81fb3cae708c984efa7e5b116208
-rw-r--r--pseudocode/operators/RESCALE.tosac1
1 files changed, 1 insertions, 0 deletions
diff --git a/pseudocode/operators/RESCALE.tosac b/pseudocode/operators/RESCALE.tosac
index 555d4ca..e2957a4 100644
--- a/pseudocode/operators/RESCALE.tosac
+++ b/pseudocode/operators/RESCALE.tosac
@@ -23,6 +23,7 @@ for_each(index in shape) {
ERROR_IF(out_t == i32_t && input_unsigned);
ERROR_IF(in_t == i32_t && output_unsigned);
ERROR_IF(in_t == i48_t && output_unsigned);
+ ERROR_IF(per_channel && rank(input) < 1);
in_t in_value = tensor_read<in_t>(input, shape, index);