From 007a2c7c0743b002587cd5e7b4c6b6acbcaedff8 Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Wed, 4 Jan 2023 14:47:16 +0000 Subject: Create MI tests for EW Binary: ADD, SUB, MUL Signed-off-by: Jeremy Johnson Change-Id: Iefd40317b8e2a4ff74e8f835d580a2fc623c5875 --- .../sub/sub_1_f16/Conformance-result-0.json | 52 ++++++++++++++++++++ operators/ew_binary/sub/sub_1_f16/desc.json | 25 ++++++++++ operators/ew_binary/sub/sub_1_f16/input-0.json | 6 +++ operators/ew_binary/sub/sub_1_f16/input-1.json | 52 ++++++++++++++++++++ operators/ew_binary/sub/sub_1_f16/test.json | 56 ++++++++++++++++++++++ 5 files changed, 191 insertions(+) create mode 100644 operators/ew_binary/sub/sub_1_f16/Conformance-result-0.json create mode 100644 operators/ew_binary/sub/sub_1_f16/desc.json create mode 100644 operators/ew_binary/sub/sub_1_f16/input-0.json create mode 100644 operators/ew_binary/sub/sub_1_f16/input-1.json create mode 100644 operators/ew_binary/sub/sub_1_f16/test.json (limited to 'operators/ew_binary/sub/sub_1_f16') diff --git a/operators/ew_binary/sub/sub_1_f16/Conformance-result-0.json b/operators/ew_binary/sub/sub_1_f16/Conformance-result-0.json new file mode 100644 index 000000000..5a2a47f88 --- /dev/null +++ b/operators/ew_binary/sub/sub_1_f16/Conformance-result-0.json @@ -0,0 +1,52 @@ +{ + "type": "float16", + "data": [ + -1.771484375, + -0.84130859375, + -2.423828125, + -1.89453125, + -0.34228515625, + -2.421875, + -2.3125, + -0.642578125, + -0.24609375, + -1.822265625, + 0.3486328125, + 0.107421875, + 0.8779296875, + -2.240234375, + -1.751953125, + -1.9140625, + -2.21484375, + -0.9287109375, + -1.3671875, + 0.34765625, + 0.44921875, + -1.7666015625, + -0.97705078125, + -1.353515625, + -2.15234375, + -1.6318359375, + -1.306640625, + -1.330078125, + -0.30859375, + 0.7841796875, + -0.83984375, + 0.048828125, + -0.7265625, + -2.5078125, + -0.0283203125, + 0.673828125, + -0.21826171875, + -0.26708984375, + -1.740234375, + -1.3212890625, + -2.228515625, + -1.75, + -0.71826171875, + -2.34765625, + 0.2392578125, + 0.81640625, + 0.546875 + ] +} \ No newline at end of file diff --git a/operators/ew_binary/sub/sub_1_f16/desc.json b/operators/ew_binary/sub/sub_1_f16/desc.json new file mode 100644 index 000000000..5ee7961df --- /dev/null +++ b/operators/ew_binary/sub/sub_1_f16/desc.json @@ -0,0 +1,25 @@ +{ + "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": 0, + "expected_failure": false, + "expected_result_file": [ + "Conformance-result-0.npy" + ], + "profile": [ + "tosa-mi" + ] +} \ No newline at end of file diff --git a/operators/ew_binary/sub/sub_1_f16/input-0.json b/operators/ew_binary/sub/sub_1_f16/input-0.json new file mode 100644 index 000000000..76d96eb17 --- /dev/null +++ b/operators/ew_binary/sub/sub_1_f16/input-0.json @@ -0,0 +1,6 @@ +{ + "type": "float16", + "data": [ + -1.0927734375 + ] +} \ No newline at end of file diff --git a/operators/ew_binary/sub/sub_1_f16/input-1.json b/operators/ew_binary/sub/sub_1_f16/input-1.json new file mode 100644 index 000000000..92cc3d122 --- /dev/null +++ b/operators/ew_binary/sub/sub_1_f16/input-1.json @@ -0,0 +1,52 @@ +{ + "type": "float16", + "data": [ + 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, + -1.4404296875, + -1.5419921875, + 0.673828125, + -0.1156005859375, + 0.260986328125, + 1.0595703125, + 0.5390625, + 0.21435546875, + 0.23681640625, + -0.7841796875, + -1.876953125, + -0.253173828125, + -1.1416015625, + -0.365966796875, + 1.4140625, + -1.064453125, + -1.7666015625, + -0.87451171875, + -0.82568359375, + 0.6474609375, + 0.2281494140625, + 1.1357421875, + 0.6572265625, + -0.37451171875, + 1.255859375, + -1.33203125, + -1.9091796875, + -1.6396484375 + ] +} \ No newline at end of file diff --git a/operators/ew_binary/sub/sub_1_f16/test.json b/operators/ew_binary/sub/sub_1_f16/test.json new file mode 100644 index 000000000..4fc6ab048 --- /dev/null +++ b/operators/ew_binary/sub/sub_1_f16/test.json @@ -0,0 +1,56 @@ +{ + version: { + _major: 0, + _minor: 51, + _patch: 0, + _draft: true + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "SUB", + attribute_type: "NONE", + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0" + ] + } + ], + tensors: [ + { + name: "input-0", + shape: [ + 1 + ], + type: "FP16" + }, + { + name: "input-1", + shape: [ + 47 + ], + type: "FP16" + }, + { + name: "result-0", + shape: [ + 47 + ], + type: "FP16" + } + ], + inputs: [ + "input-0", + "input-1" + ], + outputs: [ + "result-0" + ] + } + ] +} -- cgit v1.2.1