From b227ae5ff22411c3f7c82e2b4b5a4618008e897a Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Thu, 2 Sep 2021 13:43:17 -0700 Subject: Fix while_loop test. - add output tensor to main block - fix bug where tensor cannot serialize list of const data Signed-off-by: Kevin Cheng Change-Id: I40b96d634642e24e6fae6fa3ad6846f5911005f7 --- verif/tosa_serializer.py | 3 +++ verif/tosa_test_gen.py | 1 + 2 files changed, 4 insertions(+) diff --git a/verif/tosa_serializer.py b/verif/tosa_serializer.py index b7f5565..e9ec027 100644 --- a/verif/tosa_serializer.py +++ b/verif/tosa_serializer.py @@ -358,6 +358,9 @@ class TosaSerializerTensor: data = data.flatten().astype(int).tolist() data = list(map(int, data)) self.data = data + elif isinstance(data, list): + data = list(map(int, data)) + self.data = data else: self.data = None diff --git a/verif/tosa_test_gen.py b/verif/tosa_test_gen.py index 760ed06..942f75c 100644 --- a/verif/tosa_test_gen.py +++ b/verif/tosa_test_gen.py @@ -1798,6 +1798,7 @@ class TosaTestGen: [iter_out.name, a_out.name, acc_out.name], attr, ) + self.ser.addOutputTensor(acc_out) # COND block (input: iter, output: cond_tens ) self.ser.startBasicBlock(cond_block) -- cgit v1.2.1