aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2024-03-21 10:32:26 +0000
committerJeremy Johnson <jeremy.johnson@arm.com>2024-03-21 10:32:26 +0000
commitac8c0c83e52e0408191787e16b2b3bca1baf3ce7 (patch)
treef981a368d2ec283054e517a93e9bfc8172ec0d49
parent44d13fbf1f29a08c5cba249b35460114c0e02cd6 (diff)
downloadreference_model-ac8c0c83e52e0408191787e16b2b3bca1baf3ce7.tar.gz
Reduce WrongRank tests to the minimum needed
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com> Change-Id: Ideeb67ec4b33b9c6922d6765f4b0eb5ca69bdf89
-rw-r--r--verif/generator/tosa_error_if.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/verif/generator/tosa_error_if.py b/verif/generator/tosa_error_if.py
index 1b6b044..53a3199 100644
--- a/verif/generator/tosa_error_if.py
+++ b/verif/generator/tosa_error_if.py
@@ -680,14 +680,13 @@ class TosaErrorValidator:
@staticmethod
def evWrongRank(check=False, **kwargs):
- # From 1 to MAX_TENSOR_RANK+1 inclusively
- all_ranks = tuple(range(1, gtu.MAX_TENSOR_RANK + 2))
-
# Make a list of incorrect ranks
assert "op" in kwargs
op = kwargs["op"]
rmin, rmax = op["rank"]
rank_range = range(rmin, rmax + 1)
+ # From 1 to rmax+1 inclusively
+ all_ranks = tuple(range(1, rmax + 2))
incorrect_ranks = list(set(all_ranks) - set(rank_range))
# Remove small incorrect ranks to avoid index errors
incorrect_ranks = [rank for rank in incorrect_ranks if rank > rmin]