aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Haddon <matthew.haddon@arm.com>2021-07-07 11:28:29 +0100
committerMatthew Haddon <matthew.haddon@arm.com>2021-07-09 09:38:38 +0100
commit5fc4e683237274216d66dbd15727932657ebc6c4 (patch)
treef16c7eb4b6771ce9e8e0e98a935fdd57a0ee5501
parent2ad047dcc814b8edb519efb5472ab03fbc30e9e5 (diff)
downloadreference_model-5fc4e683237274216d66dbd15727932657ebc6c4.tar.gz
Fix bug causing reshape rank not to match test description.
* Tests produced now correctly display the rank being reshaped to in the file name. Signed-off-by: Matthew Haddon <matthew.haddon@arm.com> Change-Id: Ic31fce68b6b8bf7aa52686d54752d90d4b7e2242
-rw-r--r--verif/tosa_test_gen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/verif/tosa_test_gen.py b/verif/tosa_test_gen.py
index 2566f69..df9a649 100644
--- a/verif/tosa_test_gen.py
+++ b/verif/tosa_test_gen.py
@@ -613,7 +613,7 @@ class TosaArgGen:
factors = TosaArgGen.getFactors(totalElements)
for p in range(testGen.args.num_rand_permutations):
- newRank = testGen.randInt(1, 6)
+ newRank = testGen.randInt(1, 7)
if len(factors) < newRank:
continue
@@ -625,7 +625,7 @@ class TosaArgGen:
# Generate newShape ensuring it isn't a duplicate
remainingElements = totalElements
shuffledFactors = testGen.rng.permutation(factors)
- for i in range(newRank):
+ for i in range(1, newRank):
# pick rank-1 factors
newShape.append(shuffledFactors[0])
remainingElements = remainingElements // shuffledFactors[0]