aboutsummaryrefslogtreecommitdiff
path: root/operators/type_conversion/cast/cast_20_f16_outi16
diff options
context:
space:
mode:
authorJames Ward <james.ward@arm.com>2023-01-31 12:20:46 +0000
committerEric Kunze <eric.kunze@arm.com>2023-02-02 22:02:40 +0000
commitde1c2ce9e0710f39464069d880fac7bb9ec24d1a (patch)
tree795ca43d4958ce877b7acad79931cdbfeaa4970d /operators/type_conversion/cast/cast_20_f16_outi16
parentee8287e7d32a98f5e6197a361702bfc07e6efd91 (diff)
downloadconformance_tests-de1c2ce9e0710f39464069d880fac7bb9ec24d1a.tar.gz
Create MI tests for Type Conversion: CAST
Signed-off-by: James Ward <james.ward@arm.com> Change-Id: I2faca325583245248e7043cf3359e696ececac19
Diffstat (limited to 'operators/type_conversion/cast/cast_20_f16_outi16')
-rw-r--r--operators/type_conversion/cast/cast_20_f16_outi16/Conformance-result-0.json25
-rw-r--r--operators/type_conversion/cast/cast_20_f16_outi16/desc.json23
-rw-r--r--operators/type_conversion/cast/cast_20_f16_outi16/input-0.json25
-rw-r--r--operators/type_conversion/cast/cast_20_f16_outi16/test.json52
4 files changed, 125 insertions, 0 deletions
diff --git a/operators/type_conversion/cast/cast_20_f16_outi16/Conformance-result-0.json b/operators/type_conversion/cast/cast_20_f16_outi16/Conformance-result-0.json
new file mode 100644
index 000000000..85ca302e3
--- /dev/null
+++ b/operators/type_conversion/cast/cast_20_f16_outi16/Conformance-result-0.json
@@ -0,0 +1,25 @@
+{
+ "type": "int32",
+ "data": [
+ -1,
+ 1,
+ 0,
+ 1,
+ 1,
+ -1,
+ 1,
+ 1,
+ 0,
+ -1,
+ 1,
+ -1,
+ -1,
+ -2,
+ 1,
+ 1,
+ 1,
+ 1,
+ 0,
+ 0
+ ]
+} \ No newline at end of file
diff --git a/operators/type_conversion/cast/cast_20_f16_outi16/desc.json b/operators/type_conversion/cast/cast_20_f16_outi16/desc.json
new file mode 100644
index 000000000..d418e4060
--- /dev/null
+++ b/operators/type_conversion/cast/cast_20_f16_outi16/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_20_f16_outi16/input-0.json b/operators/type_conversion/cast/cast_20_f16_outi16/input-0.json
new file mode 100644
index 000000000..96db5750d
--- /dev/null
+++ b/operators/type_conversion/cast/cast_20_f16_outi16/input-0.json
@@ -0,0 +1,25 @@
+{
+ "type": "float16",
+ "data": [
+ -1.0927734375,
+ 0.67919921875,
+ -0.25146484375,
+ 1.3310546875,
+ 0.80126953125,
+ -0.75048828125,
+ 1.3291015625,
+ 1.21875,
+ -0.4501953125,
+ -0.8466796875,
+ 0.72998046875,
+ -1.44140625,
+ -1.2001953125,
+ -1.970703125,
+ 1.1474609375,
+ 0.6591796875,
+ 0.82080078125,
+ 1.123046875,
+ -0.164306640625,
+ 0.27490234375
+ ]
+} \ No newline at end of file
diff --git a/operators/type_conversion/cast/cast_20_f16_outi16/test.json b/operators/type_conversion/cast/cast_20_f16_outi16/test.json
new file mode 100644
index 000000000..7084694ce
--- /dev/null
+++ b/operators/type_conversion/cast/cast_20_f16_outi16/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: [
+ 20
+ ],
+ type: "FP16"
+ },
+ {
+ name: "result-0",
+ shape: [
+ 20
+ ],
+ type: "INT16"
+ }
+ ],
+ inputs: [
+ "input-0"
+ ],
+ outputs: [
+ "result-0"
+ ]
+ }
+ ]
+ }
+ ]
+}