From 960985a8c6aac1a5b0822a97fe222c2b441acda1 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Wed, 6 Oct 2021 10:58:14 +0100 Subject: Fix shape generation with num-const-inputs-concat option Change-Id: I2a0aa63a4256629d12166638812dc5b854db2ddf Signed-off-by: Jeremy Johnson --- verif/tosa_test_gen.py | 6 ++++-- 1 file 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 -- cgit v1.2.1