From e926477175d04742f000925b4780d97e0c919e86 Mon Sep 17 00:00:00 2001 From: James Ward Date: Wed, 14 Dec 2022 12:16:05 +0000 Subject: Create MI tests for EW Binary: MINIMUM, MAXIMUM Signed-off-by: James Ward Change-Id: I59cc5c683e270dcea7ced52fc1d037a553ff544f --- .../desc.json | 23 +++++++++ .../input-0.json | 49 ++++++++++++++++++ .../input-1.json | 53 +++++++++++++++++++ .../test.json | 59 ++++++++++++++++++++++ 4 files changed, 184 insertions(+) create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/desc.json create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-0.json create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-1.json create mode 100644 operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/test.json (limited to 'operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16') diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/desc.json b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/desc.json new file mode 100644 index 000000000..c1f41190c --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/desc.json @@ -0,0 +1,23 @@ +{ + "tosa_file": "test.json", + "ifm_name": [ + "input-0", + "input-1" + ], + "ifm_file": [ + "input-0.npy", + "input-1.npy" + ], + "ofm_name": [ + "result-0" + ], + "ofm_file": [ + "result-0.npy" + ], + "expected_return_code": 2, + "expected_failure": true, + "expected_failure_desc": "Input Dimensions do not match output", + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-0.json b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-0.json new file mode 100644 index 000000000..30a753b50 --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-0.json @@ -0,0 +1,49 @@ +{ + "type": "float32", + "data": [ + [ + 0.46875, + 0.60546875 + ], + [ + 0.37890625, + 0.57421875 + ], + [ + 0.2373046875, + 0.828125 + ], + [ + 0.35546875, + 0.474609375 + ], + [ + 0.76953125, + 0.91015625 + ], + [ + 0.142578125, + 0.109375 + ], + [ + 0.6796875, + 0.3046875 + ], + [ + 0.0267333984375, + 0.6015625 + ], + [ + 0.2216796875, + 0.73828125 + ], + [ + 0.83203125, + 0.5859375 + ], + [ + 0.76953125, + 0.44140625 + ] + ] +} \ No newline at end of file diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-1.json b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-1.json new file mode 100644 index 000000000..844d492a7 --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/input-1.json @@ -0,0 +1,53 @@ +{ + "type": "float32", + "data": [ + [ + 0.07958984375, + 0.384765625 + ], + [ + 0.7421875, + 0.126953125 + ], + [ + 0.310546875, + 0.84765625 + ], + [ + 0.56640625, + 0.072265625 + ], + [ + 0.65234375, + 0.10498046875 + ], + [ + 0.435546875, + 0.51953125 + ], + [ + 0.49609375, + 0.083984375 + ], + [ + 0.59375, + 0.400390625 + ], + [ + 0.72265625, + 0.78515625 + ], + [ + 0.33984375, + 0.470703125 + ], + [ + 0.58203125, + 0.76953125 + ], + [ + 0.36328125, + 0.5625 + ] + ] +} \ No newline at end of file diff --git a/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/test.json b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/test.json new file mode 100644 index 000000000..36c359e35 --- /dev/null +++ b/operators/ew_binary/maximum/maximum_ERRORIF_DimensionMismatch_11x2_bf16/test.json @@ -0,0 +1,59 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "MAXIMUM", + attribute_type: "NONE", + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 11, + 2 + ], + type: "BF16" + }, + { + name: "input-1", + shape: [ + 12, + 2 + ], + type: "BF16" + }, + { + name: "result-0", + shape: [ + 11, + 2 + ], + type: "BF16" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0" + ] + } + ] +} -- cgit v1.2.1