From f20a5a48d1df6b4d9c6da38533f77af5591e939e Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Wed, 8 Dec 2021 16:13:21 +0000 Subject: Stop COND_IF neg tests creating bad arrays Signed-off-by: Jeremy Johnson Change-Id: I267fa624241f60f1fa613e27e4fe46fc43768f8a --- verif/tosa_test_gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/verif/tosa_test_gen.py b/verif/tosa_test_gen.py index 655cdfc..0071b9f 100644 --- a/verif/tosa_test_gen.py +++ b/verif/tosa_test_gen.py @@ -4761,7 +4761,7 @@ class TosaTestGen: if error_name in [ErrorIf.CondIfOutputListThenGraphMismatch, ErrorIf.CondIfOutputListElseGraphMismatch]: incorrect_shape = deepcopy(then_tens.shape) for i in range(len(incorrect_shape)): - incorrect_shape[i] = incorrect_shape[i] + self.rng.choice([-3, -2, 2, 3]) + incorrect_shape[i] += self.rng.choice([-3, -2, 2, 3]) if incorrect_shape[i] > 3 else self.rng.choice([1, 2, 4]) incorrect_arr = np.int32(self.rng.integers(0, 256, size=incorrect_shape)) then_arr = np.int32(self.rng.integers(0, 256, size=out_shape)) -- cgit v1.2.1