From 7ad78d37a51f8b333367effe62d596ac89cdcdb5 Mon Sep 17 00:00:00 2001 From: Eric Kunze Date: Fri, 12 Apr 2024 16:03:52 -0700 Subject: Disallow per channel RESCALE if rank < 1 per channel rescaling doesn't make sense for a rank 0 input. Signed-off-by: Eric Kunze Change-Id: Icfa58403953c81fb3cae708c984efa7e5b116208 --- pseudocode/operators/RESCALE.tosac | 1 + 1 file changed, 1 insertion(+) 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(input, shape, index); -- cgit v1.2.1