diff options
author | Won Jeon <won.jeon@arm.com> | 2024-01-09 00:34:40 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2024-01-24 21:01:20 +0000 |
commit | 74342e522ec61e85fde64fe801da9e750b3e2d86 (patch) | |
tree | 473a02dcbccb5dcf7aee009682454aa2b914bb64 /verif/conformance | |
parent | 1f75232dab1b50162ebc420e6e076edeb8a58341 (diff) | |
download | reference_model-74342e522ec61e85fde64fe801da9e750b3e2d86.tar.gz |
Add conformance testing for shape operators
Signed-off-by: Won Jeon <won.jeon@arm.com>
Change-Id: Ie80570146601c470a3be7c04a9d6e1016a7c547c
Diffstat (limited to 'verif/conformance')
-rw-r--r-- | verif/conformance/test_select.py | 38 | ||||
-rw-r--r-- | verif/conformance/tosa_base_profile_ops_info.json | 175 |
2 files changed, 212 insertions, 1 deletions
diff --git a/verif/conformance/test_select.py b/verif/conformance/test_select.py index cebdf62..55eef58 100644 --- a/verif/conformance/test_select.py +++ b/verif/conformance/test_select.py @@ -1,4 +1,4 @@ -# Copyright (c) 2021-2023, ARM Limited. +# Copyright (c) 2021-2024, ARM Limited. # SPDX-License-Identifier: Apache-2.0 """Select generated tests.""" import argparse @@ -437,6 +437,12 @@ class AddOperator(Operator): name = "add" +class AddShapeOperator(Operator): + """Test selector for the ADD_SHAPE operator.""" + + name = "add_shape" + + class ArgmaxOperator(Operator): """Test selector for the ARGMAX operator.""" @@ -507,6 +513,12 @@ class ConcatOperator(Operator): param_names = ["shape", "type", "axis"] +class ConcatShapeOperator(Operator): + """Test selector for the CONCAT_SHAPE operator.""" + + name = "concat_shape" + + class CondIfOperator(Operator): """Test selector for the COND_IF operator.""" @@ -520,6 +532,12 @@ class ConstOperator(Operator): name = "const" +class ConstShapeOperator(Operator): + """Test selector for the CONST_SHAPE operator.""" + + name = "const_shape" + + class Conv2dOperator(Operator): """Test selector for the CONV2D operator.""" @@ -548,6 +566,12 @@ class DimOeprator(Operator): param_names = ["shape", "type", "axis"] +class DivShapeOperator(Operator): + """Test selector for the DIV_SHAPE operator.""" + + name = "div_shape" + + class EqualOperator(Operator): """Test selector for the EQUAL operator.""" @@ -696,6 +720,12 @@ class MulOperator(Operator): param_names = ["shape", "type", "perm", "shift"] +class MulShapeOperator(Operator): + """Test selector for the MUL_SHAPE operator.""" + + name = "mul_shape" + + class NegateOperator(Operator): """Test selector for the Negate operator.""" @@ -849,6 +879,12 @@ class SubOperator(Operator): name = "sub" +class SubShapeOperator(Operator): + """Test selector for the SUB_SHAPE operator.""" + + name = "sub_shape" + + class TableOperator(Operator): """Test selector for the TABLE operator.""" diff --git a/verif/conformance/tosa_base_profile_ops_info.json b/verif/conformance/tosa_base_profile_ops_info.json index b186b06..ec51324 100644 --- a/verif/conformance/tosa_base_profile_ops_info.json +++ b/verif/conformance/tosa_base_profile_ops_info.json @@ -129,6 +129,35 @@ } } }, + "add_shape": { + "group": "shape", + "profile": [ + "tosa-bi", + "tosa-mi" + ], + "generation": { + "standard": { + "generator_args": [ + [ + "--target-dtype", + "shape", + "--tensor-dim-range", + "1,16", + "--target-rank", + "1" + ] + ] + } + }, + "selection": { + "default": { + "params": {}, + "permutes": [ + "shape" + ] + } + } + }, "argmax": { "group": "tensor", "profile": [ @@ -974,6 +1003,36 @@ } } }, + "concat_shape": { + "group": "shape", + "profile": [ + "tosa-bi", + "tosa-mi" + ], + "generation": { + "standard": { + "generator_args": [ + [ + "--target-dtype", + "shape", + "--target-rank", + "1", + "--target-shape", + "1", + "--num-const-inputs-concat", + "2" + ] + ] + } + }, + "selection": { + "default": { + "params": {}, + "permutes": [ + ] + } + } + }, "cond_if": { "group": "control_flow", "profile": [ @@ -1080,6 +1139,35 @@ } } }, + "const_shape": { + "group": "shape", + "profile": [ + "tosa-bi", + "tosa-mi" + ], + "generation": { + "standard": { + "no_negative_tests": "true", + "generator_args": [ + [ + "--target-dtype", + "shape", + "--target-rank", + "1", + "--target-shape", + "1" + ] + ] + } + }, + "selection": { + "default": { + "params": {}, + "permutes": [ + ] + } + } + }, "conv2d": { "group": "tensor", "profile": [ @@ -1374,6 +1462,35 @@ } } }, + "div_shape": { + "group": "shape", + "profile": [ + "tosa-bi", + "tosa-mi" + ], + "generation": { + "standard": { + "generator_args": [ + [ + "--target-dtype", + "shape", + "--tensor-dim-range", + "1,16", + "--target-rank", + "1" + ] + ] + } + }, + "selection": { + "default": { + "params": {}, + "permutes": [ + "shape" + ] + } + } + }, "equal": { "group": "comparison", "profile": [ @@ -2542,6 +2659,35 @@ } } }, + "mul_shape": { + "group": "shape", + "profile": [ + "tosa-bi", + "tosa-mi" + ], + "generation": { + "standard": { + "generator_args": [ + [ + "--target-dtype", + "shape", + "--tensor-dim-range", + "1,16", + "--target-rank", + "1" + ] + ] + } + }, + "selection": { + "default": { + "params": {}, + "permutes": [ + "shape" + ] + } + } + }, "negate": { "group": "ew_unary", "profile": [ @@ -3502,6 +3648,35 @@ } } }, + "sub_shape": { + "group": "shape", + "profile": [ + "tosa-bi", + "tosa-mi" + ], + "generation": { + "standard": { + "generator_args": [ + [ + "--target-dtype", + "shape", + "--tensor-dim-range", + "1,16", + "--target-rank", + "1" + ] + ] + } + }, + "selection": { + "default": { + "params": {}, + "permutes": [ + "shape" + ] + } + } + }, "table": { "group": "ew_binary", "profile": [ |