From dd3e9aaa18ac3862b7ad44cd1d76017db1561d86 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Mon, 6 Feb 2023 16:58:04 +0000 Subject: Adjust ERROR_IF tests generated for tosa-mi profile So they do not overwrite tosa-bi tests, ops affected: NEGATE, TILE, REDUCE_MIN, REDUCE_MAX, RESIZE, SCATTER, GATHER Update test-select exclude-patterns to work with ERRORIF tests. Signed-off-by: Jeremy Johnson Change-Id: Idb0d26512ce9a48f6d868663a630e343c8785899 --- verif/conformance/test_select.py | 13 ++++++++----- verif/conformance/tosa_main_profile_ops_info.json | 12 +++++++++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/verif/conformance/test_select.py b/verif/conformance/test_select.py index 6161523..061a109 100644 --- a/verif/conformance/test_select.py +++ b/verif/conformance/test_select.py @@ -149,11 +149,12 @@ class Operator: Exclusion happens BEFORE test selection (i.e. before permutes are applied). "errorifs" - list of ERRORIF case names to be selected - (negative test) + after exclusion (negative tests) negative: bool indicating if negative testing is being selected - (ERRORIF tests) + which filters for ERRORIF in the test name and only selects + the first test found (ERRORIF tests) - EXAMPLE CONFIG: + EXAMPLE CONFIG (with non-json comments): "params": { "output_type": [ "outi8", @@ -175,7 +176,10 @@ class Operator: } ], "exclude_patterns": [ - ".*_(i8|i16|i32|b)_out(i8|i16|i32|b)" + # Exclude positive (not ERRORIF) integer tests + "^((?!ERRORIF).)*_(i8|i16|i32|b)_out(i8|i16|i32|b)", + # Exclude negative (ERRORIF) i8 test + ".*_ERRORIF_.*_i8_outi8" ], "errorifs": [ "InputZeroPointNotZero" @@ -199,7 +203,6 @@ class Operator: ) config["permutes"] = [] config["preselected"] = {} - config["exclude_patterns"] = [] self.params = config["params"] if "params" in config else {} self.permutes = config["permutes"] if "permutes" in config else [] diff --git a/verif/conformance/tosa_main_profile_ops_info.json b/verif/conformance/tosa_main_profile_ops_info.json index 7b05477..675ec9f 100644 --- a/verif/conformance/tosa_main_profile_ops_info.json +++ b/verif/conformance/tosa_main_profile_ops_info.json @@ -285,7 +285,7 @@ "output_type" ], "exclude_patterns": [ - ".*_(i8|i16|i32|b)_out(i8|i16|i32|b)" + "^((?!ERRORIF).)*_(i8|i16|i32|b)_out(i8|i16|i32|b)" ], "profile": [ "tosa-mi" @@ -786,6 +786,7 @@ }, "gather": { "group": "scatter_gather", + "generator_negative_dim_range": "1,10", "generator_args": [ [ "--target-dtype", @@ -1154,6 +1155,7 @@ }, "negate": { "group": "ew_unary", + "generator_negative_dim_range": "1,10", "generator_args": [ [ "--target-dtype", @@ -1523,6 +1525,7 @@ }, "scatter": { "group": "scatter_gather", + "generator_negative_dim_range": "1,10", "generator_args": [ [ "--target-dtype", @@ -1560,6 +1563,7 @@ }, "tile": { "group": "data_layout", + "generator_negative_dim_range": "1,10", "generator_args": [ [ "--target-dtype", @@ -1825,6 +1829,7 @@ }, "reduce_max": { "group": "reduction", + "generator_negative_dim_range": "1,10", "generator_args": [ [ "--target-dtype", @@ -1861,6 +1866,7 @@ }, "reduce_min": { "group": "reduction", + "generator_negative_dim_range": "1,10", "generator_args": [ [ "--target-dtype", @@ -1965,6 +1971,7 @@ }, "resize": { "group": "image", + "generator_negative_dim_range": "1,10", "generator_args": [ [ "--target-dtype", @@ -2000,6 +2007,9 @@ "shape", "type" ], + "exclude_patterns": [ + ".*_ERRORIF_MaxDimExceeded_1x16584x5x1_.*" + ], "profile": [ "tosa-mi" ] -- cgit v1.2.1