aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2021-10-06 10:58:14 +0100
committerEric Kunze <eric.kunze@arm.com>2021-10-07 14:58:09 +0000
commit960985a8c6aac1a5b0822a97fe222c2b441acda1 (patch)
tree6e987492a10e57010d1de0632c2b915859399a0b
parentec5586c198e81fba43f598af9ecd7a54cf460ea3 (diff)
downloadreference_model-960985a8c6aac1a5b0822a97fe222c2b441acda1.tar.gz
Fix shape generation with num-const-inputs-concat option
Change-Id: I2a0aa63a4256629d12166638812dc5b854db2ddf Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
-rw-r--r--verif/tosa_test_gen.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/verif/tosa_test_gen.py b/verif/tosa_test_gen.py
index 07dc7e5..fbf240d 100644
--- a/verif/tosa_test_gen.py
+++ b/verif/tosa_test_gen.py
@@ -404,10 +404,12 @@ class TosaTensorGen:
def tgConcatConstInput(testGen, shapeList, axis):
# Split concat shape along axis to allow for multiple const inputs
# without making too many large tensors
- shape = shapeList[0]
- if len(shapeList) == 2 or shape[axis] < len(shapeList):
+ if len(shapeList) == 2 or shapeList[0][axis] < len(shapeList):
return shapeList
+ # Create copy of shape we are going to split (so we don't alter shapeList)
+ shape = shapeList[0].copy()
+ # Add original shape as first input
new_shapeList = [shape.copy()]
length_on_axis = shape[axis]
remaining_length = length_on_axis