From 9438531ceffbf9f8c6c123b93ec81656f6685fef Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 14 Dec 2022 12:22:49 +0000 Subject: Create MI tests for Reduction: REDUCE_MIN, REDUCE_MAX Signed-off-by: James Ward Change-Id: I203c8f2fdfe10342a4b6bf6572b643b7c7eda1e2 --- .../Conformance-result-0.json | 6 +++ .../reduce_max/reduce_max_3_f16_axis0/desc.json | 23 ++++++++++ .../reduce_max/reduce_max_3_f16_axis0/input-0.json | 8 ++++ .../reduce_max/reduce_max_3_f16_axis0/test.json | 50 ++++++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 operators/reduction/reduce_max/reduce_max_3_f16_axis0/Conformance-result-0.json create mode 100644 operators/reduction/reduce_max/reduce_max_3_f16_axis0/desc.json create mode 100644 operators/reduction/reduce_max/reduce_max_3_f16_axis0/input-0.json create mode 100644 operators/reduction/reduce_max/reduce_max_3_f16_axis0/test.json (limited to 'operators/reduction/reduce_max/reduce_max_3_f16_axis0') diff --git a/operators/reduction/reduce_max/reduce_max_3_f16_axis0/Conformance-result-0.json b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/Conformance-result-0.json new file mode 100644 index 000000000..00305b365 --- /dev/null +++ b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/Conformance-result-0.json @@ -0,0 +1,6 @@ +{ + "type": "float16", + "data": [ + 0.2183837890625 + ] +} \ No newline at end of file diff --git a/operators/reduction/reduce_max/reduce_max_3_f16_axis0/desc.json b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/desc.json new file mode 100644 index 000000000..d418e4060 --- /dev/null +++ b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/desc.json @@ -0,0 +1,23 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-0" + ], + "ifm_file": [ + "input-0.npy" + ], + "ofm_name": [ + "result-0" + ], + "ofm_file": [ + "result-0.npy" + ], + "expected_return_code": 0, + "expected_failure": false, + "expected_result_file": [ + "Conformance-result-0.npy" + ], + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/reduction/reduce_max/reduce_max_3_f16_axis0/input-0.json b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/input-0.json new file mode 100644 index 000000000..817675074 --- /dev/null +++ b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/input-0.json @@ -0,0 +1,8 @@ +{ + "type": "float16", + "data": [ + -1.0908203125, + 0.2183837890625, + -1.7451171875 + ] +} \ No newline at end of file diff --git a/operators/reduction/reduce_max/reduce_max_3_f16_axis0/test.json b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/test.json new file mode 100644 index 000000000..55d174602 --- /dev/null +++ b/operators/reduction/reduce_max/reduce_max_3_f16_axis0/test.json @@ -0,0 +1,50 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "REDUCE_MAX", + attribute_type: "AxisAttribute", + attribute: { + axis: 0 + }, + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 3 + ], + type: "FP16" + }, + { + name: "result-0", + shape: [ + 1 + ], + type: "FP16" + } + ], + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ] +} -- cgit v1.2.1