From de1c2ce9e0710f39464069d880fac7bb9ec24d1a Mon Sep 17 00:00:00 2001 From: James Ward Date: Tue, 31 Jan 2023 12:20:46 +0000 Subject: Create MI tests for Type Conversion: CAST Signed-off-by: James Ward Change-Id: I2faca325583245248e7043cf3359e696ececac19 --- .../cast_36_i16_outbf16/Conformance-result-0.json | 41 +++++++++++++++++ .../cast/cast_36_i16_outbf16/desc.json | 23 ++++++++++ .../cast/cast_36_i16_outbf16/input-0.json | 41 +++++++++++++++++ .../cast/cast_36_i16_outbf16/test.json | 52 ++++++++++++++++++++++ 4 files changed, 157 insertions(+) create mode 100644 operators/type_conversion/cast/cast_36_i16_outbf16/Conformance-result-0.json create mode 100644 operators/type_conversion/cast/cast_36_i16_outbf16/desc.json create mode 100644 operators/type_conversion/cast/cast_36_i16_outbf16/input-0.json create mode 100644 operators/type_conversion/cast/cast_36_i16_outbf16/test.json (limited to 'operators/type_conversion/cast/cast_36_i16_outbf16') diff --git a/operators/type_conversion/cast/cast_36_i16_outbf16/Conformance-result-0.json b/operators/type_conversion/cast/cast_36_i16_outbf16/Conformance-result-0.json new file mode 100644 index 000000000..0f404f380 --- /dev/null +++ b/operators/type_conversion/cast/cast_36_i16_outbf16/Conformance-result-0.json @@ -0,0 +1,41 @@ +{ + "type": "float32", + "data": [ + 31758.0, + -2942.0, + -15477.0, + 1054.0, + 19015.0, + -12284.0, + -29655.0, + -29429.0, + 23067.0, + -25455.0, + 8884.0, + -7570.0, + 18187.0, + -28802.0, + 26069.0, + 12988.0, + -3325.0, + -19201.0, + 31269.0, + -12972.0, + -622.0, + -6939.0, + -17659.0, + -5466.0, + -22841.0, + -32660.0, + -13764.0, + -25424.0, + -5586.0, + 23774.0, + -22114.0, + -32688.0, + -25488.0, + 535.0, + -14757.0, + -688.0 + ] +} \ No newline at end of file diff --git a/operators/type_conversion/cast/cast_36_i16_outbf16/desc.json b/operators/type_conversion/cast/cast_36_i16_outbf16/desc.json new file mode 100644 index 000000000..d418e4060 --- /dev/null +++ b/operators/type_conversion/cast/cast_36_i16_outbf16/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/type_conversion/cast/cast_36_i16_outbf16/input-0.json b/operators/type_conversion/cast/cast_36_i16_outbf16/input-0.json new file mode 100644 index 000000000..b64639230 --- /dev/null +++ b/operators/type_conversion/cast/cast_36_i16_outbf16/input-0.json @@ -0,0 +1,41 @@ +{ + "type": "int32", + "data": [ + 31758, + -2942, + -15477, + 1054, + 19015, + -12284, + -29655, + -29429, + 23067, + -25455, + 8884, + -7570, + 18187, + -28802, + 26069, + 12988, + -3325, + -19201, + 31269, + -12972, + -622, + -6939, + -17659, + -5466, + -22841, + -32660, + -13764, + -25424, + -5586, + 23774, + -22114, + -32688, + -25488, + 535, + -14757, + -688 + ] +} \ No newline at end of file diff --git a/operators/type_conversion/cast/cast_36_i16_outbf16/test.json b/operators/type_conversion/cast/cast_36_i16_outbf16/test.json new file mode 100644 index 000000000..0cfae4714 --- /dev/null +++ b/operators/type_conversion/cast/cast_36_i16_outbf16/test.json @@ -0,0 +1,52 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + regions: [ + { + name: "main", + blocks: [ + { + name: "main", + operators: [ + { + op: "CAST", + attribute_type: "NONE", + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 36 + ], + type: "INT16" + }, + { + name: "result-0", + shape: [ + 36 + ], + type: "BF16" + } + ], + inputs: [ + "input-0" + ], + outputs: [ + "result-0" + ] + } + ] + } + ] +} -- cgit v1.2.1