From 512c1caa8b6d494de81f3ac83a6ebb96e1e0f8e0 Mon Sep 17 00:00:00 2001 From: James Ward Date: Fri, 27 Jan 2023 18:46:44 +0000 Subject: Create MI tests for Reduction: REDUCE_SUM, REDUCE_PRODUCT Signed-off-by: James Ward Change-Id: I21b8f8139ce069d5fc6bbeabe292e3a44d99fe10 --- verif/conformance/test_select.py | 7 +++ verif/conformance/tosa_main_profile_ops_info.json | 68 +++++++++++++++++++++++ 2 files changed, 75 insertions(+) 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": [ -- cgit v1.2.1