aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Johnson <jeremy.johnson@arm.com>2023-02-06 16:58:04 +0000
committerJeremy Johnson <jeremy.johnson@arm.com>2023-02-07 14:55:40 +0000
commitdd3e9aaa18ac3862b7ad44cd1d76017db1561d86 (patch)
treee3c5912e3fcd43a5f6e6602e28c95a93a2e36862
parent8384a6f384bda904bad68431adca6e5b4deb9324 (diff)
downloadreference_model-dd3e9aaa18ac3862b7ad44cd1d76017db1561d86.tar.gz
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 <jeremy.johnson@arm.com> Change-Id: Idb0d26512ce9a48f6d868663a630e343c8785899
-rw-r--r--verif/conformance/test_select.py13
-rw-r--r--verif/conformance/tosa_main_profile_ops_info.json12
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"
]