From 1d5ddeda5d853642fe3b2eade7d765386727021f Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Wed, 6 Mar 2024 10:11:10 +0000 Subject: Re-instate missing conformance tests Fix problems from ensuring matching op tests. Signed-off-by: Jeremy Johnson Change-Id: Ib2395110e47c56fea3cf3784a6b872fea7717db7 --- verif/conformance/README.md | 1 + verif/conformance/tosa_base_profile_ops_info.json | 5 +++++ verif/conformance/tosa_main_profile_ops_info.json | 4 ++++ verif/conformance/tosa_verif_conformance_generator.py | 12 +++++++++++- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/verif/conformance/README.md b/verif/conformance/README.md index d047802..0869ab6 100644 --- a/verif/conformance/README.md +++ b/verif/conformance/README.md @@ -18,6 +18,7 @@ Each operator entry contains: * "group" - name of the group this operator is in, in the spec * "profile" - list of profiles that this operator covers * "support_for" - optional list of supported creation modes out of: lazy_data_gen (data generation just before test run) +* "gen_filter" - optional filter string for op to give to tosa_verif_build_tests - defaults to "^opname$" * "generation" - dictionary of test generation details - see below * "selection" - dictionary of test selection details - see below diff --git a/verif/conformance/tosa_base_profile_ops_info.json b/verif/conformance/tosa_base_profile_ops_info.json index 6301b1d..c8f3442 100644 --- a/verif/conformance/tosa_base_profile_ops_info.json +++ b/verif/conformance/tosa_base_profile_ops_info.json @@ -1040,6 +1040,7 @@ "tosa-bi", "tosa-mi" ], + "gen_filter": "^cond_if", "generation": { "standard": { "generator_args": [ @@ -1175,6 +1176,7 @@ "tosa-bi", "tosa-mi" ], + "gen_filter": "^conv2d", "generation": { "standard": { "generator_args": [ @@ -1254,6 +1256,7 @@ "tosa-bi", "tosa-mi" ], + "gen_filter": "^conv3d", "generation": { "standard": { "generator_args": [ @@ -1334,6 +1337,7 @@ "tosa-bi", "tosa-mi" ], + "gen_filter": "^depthwise_conv2d", "generation": { "standard": { "generator_args": [ @@ -4020,6 +4024,7 @@ "tosa-bi", "tosa-mi" ], + "gen_filter": "^transpose_conv2d", "generation": { "standard": { "generator_args": [ diff --git a/verif/conformance/tosa_main_profile_ops_info.json b/verif/conformance/tosa_main_profile_ops_info.json index 9d68dbf..202e7b7 100644 --- a/verif/conformance/tosa_main_profile_ops_info.json +++ b/verif/conformance/tosa_main_profile_ops_info.json @@ -724,6 +724,7 @@ "tosa-mi" ], "support_for": [ "lazy_data_gen" ], + "gen_filter": "^conv2d", "generation": { "standard": { "negative_dim_range": "1,10", @@ -817,6 +818,7 @@ "tosa-mi" ], "support_for": [ "lazy_data_gen" ], + "gen_filter": "^conv3d", "generation": { "standard": { "negative_dim_range": "1,10", @@ -904,6 +906,7 @@ "tosa-mi" ], "support_for": [ "lazy_data_gen" ], + "gen_filter": "^depthwise_conv2d", "generation": { "standard": { "negative_dim_range": "1,10", @@ -2686,6 +2689,7 @@ "tosa-mi" ], "support_for": [ "lazy_data_gen" ], + "gen_filter": "^transpose_conv2d", "generation": { "standard": { "negative_dim_range": "1,10", diff --git a/verif/conformance/tosa_verif_conformance_generator.py b/verif/conformance/tosa_verif_conformance_generator.py index 987bef5..97aba13 100644 --- a/verif/conformance/tosa_verif_conformance_generator.py +++ b/verif/conformance/tosa_verif_conformance_generator.py @@ -100,6 +100,7 @@ def build_op_tests( gen_args_list, gen_neg_dim_range, supports=[], + gen_filter=None, ): """Build tests for a given operator. @@ -110,12 +111,15 @@ def build_op_tests( build_tests_cmd = "tosa_verif_build_tests" op_build_dir = args.build_dir / profile / group + if gen_filter is None: + gen_filter = f"^{operator}$" + build_cmd_base = [ build_tests_cmd, "--generate-lib-path", str(args.generate_lib_path), "--filter", - f"^{operator}$", + gen_filter, "-o", str(op_build_dir), "--seed", @@ -872,6 +876,11 @@ def main(): if "support_for" in test_params[op] else [] ) + gen_filter = ( + test_params[op]["gen_filter"] + if "gen_filter" in test_params[op] + else None + ) # Iterate through the generation groups selecting tests from each for gen_name, gen_dict in test_params[op]["generation"].items(): @@ -918,6 +927,7 @@ def main(): gen_dict["generator_args"], gen_neg_dim_range, supports=supports, + gen_filter=gen_filter, ) # Work out which selection criteria we are using -- cgit v1.2.1