diff options
author | Jared Smolens <jared.smolens@arm.com> | 2021-01-27 08:33:20 -0800 |
---|---|---|
committer | Jared Smolens <jared.smolens@arm.com> | 2021-01-27 11:41:38 -0800 |
commit | e2e13cda4c71f9d72935107bbea9a97df779e347 (patch) | |
tree | 8a55238684c87c7829ae3b2589a760da05222a71 | |
parent | 4025315d4d09e314e46b037f8c47e2096b20ddf8 (diff) | |
download | reference_model-e2e13cda4c71f9d72935107bbea9a97df779e347.tar.gz |
TOSA Unit Test updates
- For TOSA.resize, constrain random OFM dimensions to be >0 to
avoid possible div-by-zero
- Print generated test names only in verbose mode
Change-Id: Ib28457c03eca54b7721a1b1b5ba3ed89c58fd000
Signed-off-by: Jared Smolens <jared.smolens@arm.com>
-rw-r--r-- | verif/tosa_test_gen.py | 2 | ||||
-rwxr-xr-x | verif/tosa_verif_build_tests.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/verif/tosa_test_gen.py b/verif/tosa_test_gen.py index 0e57a7b..24d7b7b 100644 --- a/verif/tosa_test_gen.py +++ b/verif/tosa_test_gen.py @@ -683,7 +683,7 @@ class TosaArgGen: # Randomly generate legal output dimensions and shift # and then compute the stride and offset based on them - output_dims = [ testGen.randInt(), testGen.randInt() ] + output_dims = [ testGen.randInt(1), testGen.randInt(1) ] in_center_h = (ifm_shape[1] - 1) / 2.0 in_center_w = (ifm_shape[2] - 1) / 2.0 out_center_h = (output_dims[0] - 1) / 2.0 diff --git a/verif/tosa_verif_build_tests.py b/verif/tosa_verif_build_tests.py index 19eb2f4..b8a24dd 100755 --- a/verif/tosa_verif_build_tests.py +++ b/verif/tosa_verif_build_tests.py @@ -127,7 +127,8 @@ def main(): print('{} matching tests'.format(len(testList))) for opName, testStr, dtype, shapeList, testArgs in testList: - print(testStr) + if args.verbose: + print(testStr) ttg.serializeTest(opName, testStr, dtype, shapeList, testArgs) print('Done creating {} tests'.format(len(testList))) |