From f15bad80b5ada22f4ffdd4642e9b58e2821bf90a Mon Sep 17 00:00:00 2001 From: TatWai Chong Date: Wed, 31 Jan 2024 21:33:27 -0800 Subject: [testing] Switch to using shape type for start and size of slice The type of both start and size of slice are tosa shape type since 0.90. Update the type of these arguments and its usage in testing. Change-Id: Iff582982ad55d64a792183c6d46c9266510f924c Signed-off-by: TatWai Chong --- verif/generator/tosa_error_if.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'verif/generator/tosa_error_if.py') diff --git a/verif/generator/tosa_error_if.py b/verif/generator/tosa_error_if.py index a5a834f..90c3428 100644 --- a/verif/generator/tosa_error_if.py +++ b/verif/generator/tosa_error_if.py @@ -305,6 +305,11 @@ class TosaErrorIfArgGen: return newStart, newSize elif error_name == ErrorIf.InputSizeStartLengthMismatch: remove = testGen.rng.choice([True, False]) + + # Get an empty tensor when diminishing dimension on 1-d tensor. + if len(start) == 1 or len(size) == 1: + remove = False + if remove: newStart = start[1:] newSize = size[1:] -- cgit v1.2.1