From 7596fd972b49fecfd1c0cc0a425a5d8c64e9c33c Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Tue, 18 Oct 2022 17:38:25 +0100 Subject: Updating RESCALE tests for renaming of out type Signed-off-by: Jeremy Johnson Change-Id: I089ebcbc766f3f68f4ad8e7ca0c3cdf9c92253c6 --- .../desc.json | 22 ++++++++ .../input-0.json | 15 ++++++ .../test.json | 60 ++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/desc.json create mode 100644 operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/input-0.json create mode 100644 operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/test.json (limited to 'operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0') diff --git a/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/desc.json b/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/desc.json new file mode 100644 index 000000000..b8879370e --- /dev/null +++ b/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/desc.json @@ -0,0 +1,22 @@ +{ + "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 DType not INT8 and zero point not 0", + "profile": [ + "tosa-bi", + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/input-0.json b/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/input-0.json new file mode 100644 index 000000000..878bcb723 --- /dev/null +++ b/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/input-0.json @@ -0,0 +1,15 @@ +{ + "type": "int64", + "data": [ + -332996569798, + 8841422035220, + -111188325268391, + -28554930813539, + 117470111661962, + 36826001809668, + -90773827197895, + -45358106213840, + -86806035672828, + -133750397910440 + ] +} \ No newline at end of file diff --git a/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/test.json b/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/test.json new file mode 100644 index 000000000..dbf601dff --- /dev/null +++ b/operators/type_conversion/rescale/rescale_ERRORIF_InputZeroPointNotZero_10_i48_outi16_sc0_dr0_pc0/test.json @@ -0,0 +1,60 @@ +{ + version: { + _major: 0, + _minor: 41, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "RESCALE", + attribute_type: "RescaleAttribute", + attribute: { + input_zp: 10, + output_zp: 0, + multiplier: [ + 16384 + ], + shift: [ + 45 + ], + scale32: false, + double_round: false, + per_channel: false + }, + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 10 + ], + type: "INT48" + }, + { + name: "result-0", + shape: [ + 10 + ], + type: "INT16" + } + ], + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ] +} -- cgit v1.2.1