aboutsummaryrefslogtreecommitdiff
path: root/frameworks/tflite/operators/add_1_qi16
diff options
context:
space:
mode:
Diffstat (limited to 'frameworks/tflite/operators/add_1_qi16')
-rw-r--r--frameworks/tflite/operators/add_1_qi16/Conformance-TosaOutput_0.json6
-rw-r--r--frameworks/tflite/operators/add_1_qi16/desc.json21
-rw-r--r--frameworks/tflite/operators/add_1_qi16/model-tflite.json272
-rw-r--r--frameworks/tflite/operators/add_1_qi16/placeholder_0.json6
-rw-r--r--frameworks/tflite/operators/add_1_qi16/placeholder_1.json6
-rw-r--r--frameworks/tflite/operators/add_1_qi16/test_add_1_qi16.json164
6 files changed, 475 insertions, 0 deletions
diff --git a/frameworks/tflite/operators/add_1_qi16/Conformance-TosaOutput_0.json b/frameworks/tflite/operators/add_1_qi16/Conformance-TosaOutput_0.json
new file mode 100644
index 000000000..c795012dc
--- /dev/null
+++ b/frameworks/tflite/operators/add_1_qi16/Conformance-TosaOutput_0.json
@@ -0,0 +1,6 @@
+{
+ "type": "int32",
+ "data": [
+ 0
+ ]
+} \ No newline at end of file
diff --git a/frameworks/tflite/operators/add_1_qi16/desc.json b/frameworks/tflite/operators/add_1_qi16/desc.json
new file mode 100644
index 000000000..7add37c40
--- /dev/null
+++ b/frameworks/tflite/operators/add_1_qi16/desc.json
@@ -0,0 +1,21 @@
+{
+ "tosa_file": "test_add_1_qi16.json",
+ "ifm_name": [
+ "TosaInput_0",
+ "TosaInput_1"
+ ],
+ "ifm_file": [
+ "placeholder_0.npy",
+ "placeholder_1.npy"
+ ],
+ "ofm_name": [
+ "TosaOutput_0"
+ ],
+ "ofm_file": [
+ "output_0.npy"
+ ],
+ "expected_failure": false,
+ "expected_result_file": [
+ "Conformance-TosaOutput_0.npy"
+ ]
+} \ No newline at end of file
diff --git a/frameworks/tflite/operators/add_1_qi16/model-tflite.json b/frameworks/tflite/operators/add_1_qi16/model-tflite.json
new file mode 100644
index 000000000..e78e20627
--- /dev/null
+++ b/frameworks/tflite/operators/add_1_qi16/model-tflite.json
@@ -0,0 +1,272 @@
+{
+ version: 3,
+ operator_codes: [
+ {
+ deprecated_builtin_code: 0,
+ version: 2,
+ builtin_code: "ADD"
+ }
+ ],
+ subgraphs: [
+ {
+ tensors: [
+ {
+ shape: [
+ 1
+ ],
+ type: "INT16",
+ buffer: 1,
+ name: "serving_default_placeholder_0:0",
+ quantization: {
+ min: [
+ -1.992098
+ ],
+ max: [
+ 1.996175
+ ],
+ scale: [
+ 0.000061
+ ],
+ zero_point: [
+ 0
+ ],
+ details_type: "NONE",
+ quantized_dimension: 0
+ },
+ is_variable: false
+ },
+ {
+ shape: [
+ 1
+ ],
+ type: "INT16",
+ buffer: 2,
+ name: "serving_default_placeholder_1:0",
+ quantization: {
+ min: [
+ -1.99941
+ ],
+ max: [
+ 1.983901
+ ],
+ scale: [
+ 0.000061
+ ],
+ zero_point: [
+ 0
+ ],
+ details_type: "NONE",
+ quantized_dimension: 0
+ },
+ is_variable: false
+ },
+ {
+ shape: [
+ 1
+ ],
+ type: "INT16",
+ buffer: 3,
+ name: "PartitionedCall:0",
+ quantization: {
+ min: [
+ -3.722283
+ ],
+ max: [
+ 3.72694
+ ],
+ scale: [
+ 0.000114
+ ],
+ zero_point: [
+ 0
+ ],
+ details_type: "NONE",
+ quantized_dimension: 0
+ },
+ is_variable: false
+ }
+ ],
+ inputs: [
+ 0,
+ 1
+ ],
+ outputs: [
+ 2
+ ],
+ operators: [
+ {
+ opcode_index: 0,
+ inputs: [
+ 0,
+ 1
+ ],
+ outputs: [
+ 2
+ ],
+ builtin_options_type: "AddOptions",
+ builtin_options: {
+ fused_activation_function: "NONE",
+ pot_scale_int16: false
+ },
+ custom_options_format: "FLEXBUFFERS"
+ }
+ ],
+ name: "main"
+ }
+ ],
+ description: "MLIR Converted.",
+ buffers: [
+ {
+ },
+ {
+ },
+ {
+ },
+ {
+ },
+ {
+ data: [
+ 49,
+ 46,
+ 53,
+ 46,
+ 48,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ ]
+ },
+ {
+ data: [
+ 12,
+ 0,
+ 0,
+ 0,
+ 8,
+ 0,
+ 14,
+ 0,
+ 8,
+ 0,
+ 4,
+ 0,
+ 8,
+ 0,
+ 0,
+ 0,
+ 16,
+ 0,
+ 0,
+ 0,
+ 40,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 6,
+ 0,
+ 8,
+ 0,
+ 4,
+ 0,
+ 6,
+ 0,
+ 0,
+ 0,
+ 4,
+ 0,
+ 0,
+ 0,
+ 1,
+ 0,
+ 0,
+ 0,
+ 236,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ 10,
+ 0,
+ 16,
+ 0,
+ 12,
+ 0,
+ 8,
+ 0,
+ 4,
+ 0,
+ 10,
+ 0,
+ 0,
+ 0,
+ 3,
+ 0,
+ 0,
+ 0,
+ 2,
+ 0,
+ 0,
+ 0,
+ 4,
+ 0,
+ 0,
+ 0,
+ 5,
+ 0,
+ 0,
+ 0,
+ 50,
+ 46,
+ 57,
+ 46,
+ 48,
+ 0,
+ 0,
+ 0
+ ]
+ }
+ ],
+ metadata: [
+ {
+ name: "min_runtime_version",
+ buffer: 4
+ },
+ {
+ name: "CONVERSION_METADATA",
+ buffer: 5
+ }
+ ],
+ signature_defs: [
+ {
+ inputs: [
+ {
+ name: "placeholder_0",
+ tensor_index: 0
+ },
+ {
+ name: "placeholder_1",
+ tensor_index: 1
+ }
+ ],
+ outputs: [
+ {
+ name: "output_0",
+ tensor_index: 2
+ }
+ ],
+ method_name: "serving_default",
+ subgraph_index: 0
+ }
+ ]
+}
diff --git a/frameworks/tflite/operators/add_1_qi16/placeholder_0.json b/frameworks/tflite/operators/add_1_qi16/placeholder_0.json
new file mode 100644
index 000000000..58fa56ab2
--- /dev/null
+++ b/frameworks/tflite/operators/add_1_qi16/placeholder_0.json
@@ -0,0 +1,6 @@
+{
+ "type": "int32",
+ "data": [
+ 1
+ ]
+} \ No newline at end of file
diff --git a/frameworks/tflite/operators/add_1_qi16/placeholder_1.json b/frameworks/tflite/operators/add_1_qi16/placeholder_1.json
new file mode 100644
index 000000000..8e7b1283e
--- /dev/null
+++ b/frameworks/tflite/operators/add_1_qi16/placeholder_1.json
@@ -0,0 +1,6 @@
+{
+ "type": "int32",
+ "data": [
+ -1
+ ]
+} \ No newline at end of file
diff --git a/frameworks/tflite/operators/add_1_qi16/test_add_1_qi16.json b/frameworks/tflite/operators/add_1_qi16/test_add_1_qi16.json
new file mode 100644
index 000000000..1f69e1b40
--- /dev/null
+++ b/frameworks/tflite/operators/add_1_qi16/test_add_1_qi16.json
@@ -0,0 +1,164 @@
+{
+ version: {
+ _major: 0,
+ _minor: 30,
+ _patch: 0,
+ _draft: false
+ },
+ blocks: [
+ {
+ name: "main",
+ operators: [
+ {
+ op: "RESCALE",
+ attribute_type: "RescaleAttribute",
+ attribute: {
+ input_zp: 0,
+ output_zp: 0,
+ multiplier: [
+ 2144009193
+ ],
+ shift: [
+ 17
+ ],
+ scale32: true,
+ double_round: false,
+ per_channel: false
+ },
+ inputs: [
+ "TosaInput_0"
+ ],
+ outputs: [
+ "layer_0"
+ ]
+ },
+ {
+ op: "RESCALE",
+ attribute_type: "RescaleAttribute",
+ attribute: {
+ input_zp: 0,
+ output_zp: 0,
+ multiplier: [
+ 1073741824
+ ],
+ shift: [
+ 16
+ ],
+ scale32: true,
+ double_round: false,
+ per_channel: false
+ },
+ inputs: [
+ "TosaInput_1"
+ ],
+ outputs: [
+ "layer_1"
+ ]
+ },
+ {
+ op: "ADD",
+ attribute_type: "NONE",
+ inputs: [
+ "layer_0",
+ "layer_1"
+ ],
+ outputs: [
+ "layer_2"
+ ]
+ },
+ {
+ op: "RESCALE",
+ attribute_type: "RescaleAttribute",
+ attribute: {
+ input_zp: 0,
+ output_zp: 0,
+ multiplier: [
+ 1152071270
+ ],
+ shift: [
+ 45
+ ],
+ scale32: true,
+ double_round: true,
+ per_channel: false
+ },
+ inputs: [
+ "layer_2"
+ ],
+ outputs: [
+ "TosaOutput_0"
+ ]
+ }
+ ],
+ tensors: [
+ {
+ name: "TosaInput_0",
+ shape: [
+ 1
+ ],
+ type: "INT16",
+ data: [
+
+ ]
+ },
+ {
+ name: "TosaInput_1",
+ shape: [
+ 1
+ ],
+ type: "INT16",
+ data: [
+
+ ]
+ },
+ {
+ name: "TosaOutput_0",
+ shape: [
+ 1
+ ],
+ type: "INT16",
+ data: [
+
+ ]
+ },
+ {
+ name: "layer_0",
+ shape: [
+ 1
+ ],
+ type: "INT32",
+ data: [
+
+ ]
+ },
+ {
+ name: "layer_1",
+ shape: [
+ 1
+ ],
+ type: "INT32",
+ data: [
+
+ ]
+ },
+ {
+ name: "layer_2",
+ shape: [
+ 1
+ ],
+ type: "INT32",
+ data: [
+
+ ]
+ }
+ ],
+ inputs: [
+ "TosaInput_0",
+ "TosaInput_1"
+ ],
+ outputs: [
+ "TosaOutput_0"
+ ]
+ }
+ ]
+}