From 7d3ec0e4ed28c02203816f8169a8d29465c4dcb9 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Mon, 16 Jan 2023 15:54:36 +0000 Subject: Create MI tests for EW Unary: LOG, RECIPROCAL, RSQRT, EXP Also regen TRANSPOSE and GREATER ERROR_IF tests due to generator change to using correct filtering. Signed-off-by: Jeremy Johnson Change-Id: Id68e583a736b784c94d8cdad50a27a3dbdbf5215 --- .../desc.json | 21 ++++ .../input-0.json | 131 +++++++++++++++++++++ .../test.json | 56 +++++++++ 3 files changed, 208 insertions(+) create mode 100644 operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/desc.json create mode 100644 operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/input-0.json create mode 100644 operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/test.json (limited to 'operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32') diff --git a/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/desc.json b/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/desc.json new file mode 100644 index 000000000..15cad4b15 --- /dev/null +++ b/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/desc.json @@ -0,0 +1,21 @@ +{ + "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": 2, + "expected_failure": true, + "expected_failure_desc": "Input data type not supported for this operator", + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/input-0.json b/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/input-0.json new file mode 100644 index 000000000..9e3b8292c --- /dev/null +++ b/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/input-0.json @@ -0,0 +1,131 @@ +{ + "type": "int32", + "data": [ + [ + [ + -420701504, + 1846631167 + ], + [ + -1182449704, + -417167399 + ], + [ + 1488940824, + 567072916 + ], + [ + -432952879, + -1048711696 + ] + ], + [ + [ + -1996658093, + -1782185800 + ], + [ + -1451949900, + 1231021061 + ], + [ + 598075657, + -285753098 + ], + [ + 1215068900, + -1456933735 + ] + ], + [ + [ + -1241527348, + -460724212 + ], + [ + 1792700405, + 490623596 + ], + [ + 1507521151, + -1081636360 + ], + [ + 1496283945, + -1836185418 + ] + ], + [ + [ + -1169686468, + 98893355 + ], + [ + -1930433230, + 1538723399 + ], + [ + 1578072085, + 178098161 + ], + [ + -834081667, + -1722436827 + ] + ], + [ + [ + 510741968, + 161797801 + ], + [ + 1116549263, + 440383761 + ], + [ + -1596468299, + -1624507833 + ], + [ + 1206191548, + -1464481077 + ] + ], + [ + [ + 1883392375, + -1692443189 + ], + [ + 980863009, + 2041101482 + ], + [ + -252446374, + -1903898097 + ], + [ + 1617820287, + -1343006421 + ] + ], + [ + [ + 117929623, + 2081065856 + ], + [ + 1051283129, + -1948555225 + ], + [ + 1376562547, + -1454955038 + ], + [ + 1070962386, + 519499134 + ] + ] + ] +} \ No newline at end of file diff --git a/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/test.json b/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/test.json new file mode 100644 index 000000000..ddfe25078 --- /dev/null +++ b/operators/ew_unary/reciprocal/reciprocal_ERRORIF_WrongInputType_7x4x2_i32/test.json @@ -0,0 +1,56 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + regions: [ + { + name: "main", + blocks: [ + { + name: "main", + operators: [ + { + op: "RECIPROCAL", + attribute_type: "NONE", + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 7, + 4, + 2 + ], + type: "INT32" + }, + { + name: "result-0", + shape: [ + 7, + 4, + 2 + ], + type: "INT32" + } + ], + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ] + } + ] +} -- cgit v1.2.1