aboutsummaryrefslogtreecommitdiff
path: root/verif/generator/tosa_error_if.py
diff options
context:
space:
mode:
authorTatWai Chong <tatwai.chong@arm.com>2024-01-31 21:33:27 -0800
committerTatWai Chong <tatwai.chong@arm.com>2024-02-01 19:24:47 -0800
commitf15bad80b5ada22f4ffdd4642e9b58e2821bf90a (patch)
treece411555f09028d8555cfb563d973b8185372c3f /verif/generator/tosa_error_if.py
parent01f937a27a3b56bca622f94af7201c98dfebeb43 (diff)
downloadreference_model-f15bad80b5ada22f4ffdd4642e9b58e2821bf90a.tar.gz
[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 <tatwai.chong@arm.com>
Diffstat (limited to 'verif/generator/tosa_error_if.py')
-rw-r--r--verif/generator/tosa_error_if.py5
1 files changed, 5 insertions, 0 deletions
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:]