aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Ward <james.ward@arm.com>2023-01-27 18:46:44 +0000
committerEric Kunze <eric.kunze@arm.com>2023-02-02 22:02:26 +0000
commit512c1caa8b6d494de81f3ac83a6ebb96e1e0f8e0 (patch)
treee3a027be292b77995b24989a2836cb86889ba8ef
parent736fd1a7e4083153ccc4cf360b44dd07b6788494 (diff)
downloadreference_model-512c1caa8b6d494de81f3ac83a6ebb96e1e0f8e0.tar.gz
Create MI tests for Reduction: REDUCE_SUM, REDUCE_PRODUCT
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I21b8f8139ce069d5fc6bbeabe292e3a44d99fe10
-rw-r--r--verif/conformance/test_select.py7
-rw-r--r--verif/conformance/tosa_main_profile_ops_info.json68
2 files changed, 75 insertions, 0 deletions
diff --git a/verif/conformance/test_select.py b/verif/conformance/test_select.py
index 817d0b6..6161523 100644
--- a/verif/conformance/test_select.py
+++ b/verif/conformance/test_select.py
@@ -669,6 +669,13 @@ class ReduceMinOperator(Operator):
param_names = ["shape", "type", "axis"]
+class ReduceProductOperator(Operator):
+ """Test selector for the REDUCE_PRODUCT operator."""
+
+ name = "reduce_product"
+ param_names = ["shape", "type", "axis"]
+
+
class ReduceSumOperator(Operator):
"""Test selector for the REDUCE_SUM operator."""
diff --git a/verif/conformance/tosa_main_profile_ops_info.json b/verif/conformance/tosa_main_profile_ops_info.json
index f31fa71..c45623f 100644
--- a/verif/conformance/tosa_main_profile_ops_info.json
+++ b/verif/conformance/tosa_main_profile_ops_info.json
@@ -1801,6 +1801,74 @@
"tosa-mi"
]
},
+ "reduce_product": {
+ "group": "reduction",
+ "generator_args": [
+ [
+ "--target-dtype",
+ "fp32",
+ "--target-dtype",
+ "fp16",
+ "--target-dtype",
+ "bf16",
+ "--fp-values-range",
+ "-2.0,2.0",
+ "--tensor-dim-range",
+ "1,34"
+ ],
+ [
+ "--target-dtype",
+ "fp16",
+ "--target-shape",
+ "2,65527,3,1",
+ "--target-shape",
+ "1,3,2,65541"
+ ]
+ ],
+ "params": {},
+ "permutes": [
+ "shape",
+ "type",
+ "axis"
+ ],
+ "profile": [
+ "tosa-mi"
+ ]
+ },
+ "reduce_sum": {
+ "group": "reduction",
+ "generator_args": [
+ [
+ "--target-dtype",
+ "fp32",
+ "--target-dtype",
+ "fp16",
+ "--target-dtype",
+ "bf16",
+ "--fp-values-range",
+ "-2.0,2.0",
+ "--tensor-dim-range",
+ "1,37"
+ ],
+ [
+ "--target-dtype",
+ "bf16",
+ "--target-shape",
+ "1,3,65529,1",
+ "--target-shape",
+ "1,65537,1,1"
+ ]
+ ],
+ "params": {},
+ "permutes": [
+ "shape",
+ "type",
+ "axis"
+ ],
+ "profile": [
+ "tosa-mi"
+ ]
+ },
"resize": {
"group": "image",
"generator_args": [