From e2ac2482baa202af7fe759a6b58d9bdd75168b6a Mon Sep 17 00:00:00 2001 From: Jeremy Johnson Date: Fri, 17 Jun 2022 13:06:00 +0100 Subject: Updating framework tests for v0.30.0 release Signed-off-by: Jeremy Johnson Change-Id: I216edc7080a64aa481deb192253295a006fa4373 --- .../Conformance-TosaOutput_0.json | 175 +++ .../fully_connected_1x4x4x4_qi8/desc.json | 21 + .../fully_connected_1x4x4x4_qi8/model-tflite.json | 1208 ++++++++++++++++++++ .../fully_connected_1x4x4x4_qi8/placeholder_0.json | 111 ++ .../fully_connected_1x4x4x4_qi8/placeholder_1.json | 175 +++ .../test_matmul_1x4x4x4_qi8.json | 1084 ++++++++++++++++++ 6 files changed, 2774 insertions(+) create mode 100644 frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/Conformance-TosaOutput_0.json create mode 100644 frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/desc.json create mode 100644 frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/model-tflite.json create mode 100644 frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_0.json create mode 100644 frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_1.json create mode 100644 frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/test_matmul_1x4x4x4_qi8.json (limited to 'frameworks/tflite/operators/fully_connected_1x4x4x4_qi8') diff --git a/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/Conformance-TosaOutput_0.json b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/Conformance-TosaOutput_0.json new file mode 100644 index 000000000..196cd7d31 --- /dev/null +++ b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/Conformance-TosaOutput_0.json @@ -0,0 +1,175 @@ +{ + "type": "int32", + "data": [ + [ + [ + [ + 5, + -20, + -2, + -27, + 32, + -15, + -18, + -19 + ], + [ + 15, + 2, + 22, + 16, + -10, + 29, + 29, + 15 + ], + [ + -6, + -27, + 31, + -22, + 10, + 11, + 29, + -36 + ], + [ + 32, + 29, + 34, + 84, + 11, + 15, + 8, + 2 + ] + ], + [ + [ + -41, + 27, + 15, + 83, + -28, + -62, + -27, + 51 + ], + [ + -7, + -14, + 38, + 51, + -35, + -33, + -14, + 88 + ], + [ + 61, + -34, + 43, + -19, + 11, + 56, + -1, + 65 + ], + [ + -15, + 49, + -23, + 0, + 29, + 3, + 37, + -71 + ] + ], + [ + [ + 34, + 0, + 87, + 80, + 31, + -64, + 5, + 37 + ], + [ + -31, + -47, + 18, + 49, + 50, + 24, + -1, + -33 + ], + [ + 79, + 81, + 33, + -5, + -13, + -14, + 31, + 56 + ], + [ + -14, + -68, + 37, + 68, + 63, + 26, + 11, + -58 + ] + ], + [ + [ + 38, + -63, + -19, + 33, + -7, + 20, + -50, + 10 + ], + [ + 31, + -19, + 6, + 4, + -15, + 18, + 5, + -27 + ], + [ + 28, + -27, + -15, + 51, + -54, + 44, + -95, + 66 + ], + [ + 29, + 23, + -20, + 8, + -35, + 44, + -48, + 39 + ] + ] + ] + ] +} \ No newline at end of file diff --git a/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/desc.json b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/desc.json new file mode 100644 index 000000000..2730574ce --- /dev/null +++ b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/desc.json @@ -0,0 +1,21 @@ +{ + "tosa_file": "test_matmul_1x4x4x4_qi8.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/fully_connected_1x4x4x4_qi8/model-tflite.json b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/model-tflite.json new file mode 100644 index 000000000..69841ffde --- /dev/null +++ b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/model-tflite.json @@ -0,0 +1,1208 @@ +{ + version: 3, + operator_codes: [ + { + deprecated_builtin_code: 22, + version: 1, + builtin_code: "RESHAPE" + }, + { + deprecated_builtin_code: 49, + version: 2, + builtin_code: "SPLIT" + }, + { + deprecated_builtin_code: 39, + version: 2, + builtin_code: "TRANSPOSE" + }, + { + deprecated_builtin_code: 9, + version: 4, + builtin_code: "FULLY_CONNECTED" + }, + { + deprecated_builtin_code: 83, + version: 2, + builtin_code: "PACK" + } + ], + subgraphs: [ + { + tensors: [ + { + shape: [ + 1, + 4, + 4, + 4 + ], + type: "INT8", + buffer: 1, + name: "serving_default_placeholder_0:0", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 4, + 8 + ], + type: "INT8", + buffer: 2, + name: "serving_default_placeholder_1:0", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 3 + ], + type: "INT32", + buffer: 3, + name: "result2", + quantization: { + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + + ], + type: "INT32", + buffer: 4, + name: "result", + quantization: { + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 3 + ], + type: "INT32", + buffer: 5, + name: "result3", + quantization: { + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 2 + ], + type: "INT32", + buffer: 6, + name: "result4", + quantization: { + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 2 + ], + type: "INT32", + buffer: 7, + name: "result1", + quantization: { + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4 + ], + type: "INT32", + buffer: 8, + name: "result6", + quantization: { + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 4, + 4 + ], + type: "INT8", + buffer: 9, + name: "result7", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + buffer: 10, + name: "result8;result9;result10;result11", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + buffer: 11, + name: "result8;result9;result10;result111", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + buffer: 12, + name: "result8;result9;result10;result112", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + buffer: 13, + name: "result8;result9;result10;result113", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 4, + 8 + ], + type: "INT8", + buffer: 14, + name: "result12", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + buffer: 15, + name: "result13;result14;result15;result16", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + buffer: 16, + name: "result13;result14;result15;result161", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + buffer: 17, + name: "result13;result14;result15;result162", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + buffer: 18, + name: "result13;result14;result15;result163", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 19, + name: "result17", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 20, + name: "result18", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 21, + name: "result19", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 22, + name: "result20", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 8, + 4 + ], + type: "INT8", + buffer: 23, + name: "result21", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 24, + name: "result22", + quantization: { + scale: [ + 0.07924 + ], + zero_point: [ + 9 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 8, + 4 + ], + type: "INT8", + buffer: 25, + name: "result23", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 26, + name: "result24", + quantization: { + scale: [ + 0.07924 + ], + zero_point: [ + 9 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 8, + 4 + ], + type: "INT8", + buffer: 27, + name: "result25", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 28, + name: "result26", + quantization: { + scale: [ + 0.07924 + ], + zero_point: [ + 9 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 8, + 4 + ], + type: "INT8", + buffer: 29, + name: "result27", + quantization: { + scale: [ + 0.015685 + ], + zero_point: [ + -1 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 8 + ], + type: "INT8", + buffer: 30, + name: "result28", + quantization: { + scale: [ + 0.07924 + ], + zero_point: [ + 9 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 4, + 4, + 8 + ], + type: "INT8", + buffer: 31, + name: "result29", + quantization: { + scale: [ + 0.07924 + ], + zero_point: [ + 9 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + }, + { + shape: [ + 1, + 4, + 4, + 8 + ], + type: "INT8", + buffer: 32, + name: "PartitionedCall:0", + quantization: { + scale: [ + 0.07924 + ], + zero_point: [ + 9 + ], + details_type: "NONE", + quantized_dimension: 0 + }, + is_variable: false + } + ], + inputs: [ + 0, + 1 + ], + outputs: [ + 31 + ], + operators: [ + { + opcode_index: 0, + inputs: [ + 0, + 2 + ], + outputs: [ + 8 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 1, + inputs: [ + 3, + 8 + ], + outputs: [ + 9, + 10, + 11, + 12 + ], + builtin_options_type: "SplitOptions", + builtin_options: { + num_splits: 4 + }, + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 0, + inputs: [ + 1, + 4 + ], + outputs: [ + 13 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 1, + inputs: [ + 3, + 13 + ], + outputs: [ + 14, + 15, + 16, + 17 + ], + builtin_options_type: "SplitOptions", + builtin_options: { + num_splits: 4 + }, + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 0, + inputs: [ + 14, + 5 + ], + outputs: [ + 18 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 0, + inputs: [ + 15, + 5 + ], + outputs: [ + 19 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 0, + inputs: [ + 16, + 5 + ], + outputs: [ + 20 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 0, + inputs: [ + 17, + 5 + ], + outputs: [ + 21 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 2, + inputs: [ + 18, + 6 + ], + outputs: [ + 22 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 3, + inputs: [ + 9, + 22, + -1 + ], + outputs: [ + 23 + ], + builtin_options_type: "FullyConnectedOptions", + builtin_options: { + fused_activation_function: "NONE", + weights_format: "DEFAULT", + keep_num_dims: false, + asymmetric_quantize_inputs: false + }, + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 2, + inputs: [ + 19, + 6 + ], + outputs: [ + 24 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 3, + inputs: [ + 10, + 24, + -1 + ], + outputs: [ + 25 + ], + builtin_options_type: "FullyConnectedOptions", + builtin_options: { + fused_activation_function: "NONE", + weights_format: "DEFAULT", + keep_num_dims: false, + asymmetric_quantize_inputs: false + }, + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 2, + inputs: [ + 20, + 6 + ], + outputs: [ + 26 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 3, + inputs: [ + 11, + 26, + -1 + ], + outputs: [ + 27 + ], + builtin_options_type: "FullyConnectedOptions", + builtin_options: { + fused_activation_function: "NONE", + weights_format: "DEFAULT", + keep_num_dims: false, + asymmetric_quantize_inputs: false + }, + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 2, + inputs: [ + 21, + 6 + ], + outputs: [ + 28 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 3, + inputs: [ + 12, + 28, + -1 + ], + outputs: [ + 29 + ], + builtin_options_type: "FullyConnectedOptions", + builtin_options: { + fused_activation_function: "NONE", + weights_format: "DEFAULT", + keep_num_dims: false, + asymmetric_quantize_inputs: false + }, + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 4, + inputs: [ + 23, + 25, + 27, + 29 + ], + outputs: [ + 30 + ], + builtin_options_type: "PackOptions", + builtin_options: { + values_count: 4, + axis: 0 + }, + custom_options_format: "FLEXBUFFERS" + }, + { + opcode_index: 0, + inputs: [ + 30, + 7 + ], + outputs: [ + 31 + ], + builtin_options_type: "NONE", + custom_options_format: "FLEXBUFFERS" + } + ], + name: "main" + } + ], + description: "MLIR Converted.", + buffers: [ + { + }, + { + }, + { + }, + { + data: [ + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0 + ] + }, + { + data: [ + 0, + 0, + 0, + 0 + ] + }, + { + data: [ + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0 + ] + }, + { + data: [ + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0 + ] + }, + { + data: [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + data: [ + 1, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 4, + 0, + 0, + 0, + 8, + 0, + 0, + 0 + ] + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + }, + { + data: [ + 49, + 46, + 49, + 52, + 46, + 48, + 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, + 235, + 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: 33 + }, + { + name: "CONVERSION_METADATA", + buffer: 34 + } + ], + signature_defs: [ + { + inputs: [ + { + name: "placeholder_0", + tensor_index: 0 + }, + { + name: "placeholder_1", + tensor_index: 1 + } + ], + outputs: [ + { + name: "output_0", + tensor_index: 31 + } + ], + method_name: "serving_default", + subgraph_index: 0 + } + ] +} diff --git a/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_0.json b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_0.json new file mode 100644 index 000000000..48d7f8671 --- /dev/null +++ b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_0.json @@ -0,0 +1,111 @@ +{ + "type": "int32", + "data": [ + [ + [ + [ + -103, + 80, + 12, + 127 + ], + [ + 42, + 0, + 35, + -49 + ], + [ + -97, + 99, + 114, + 54 + ], + [ + -34, + 115, + -42, + -128 + ] + ], + [ + [ + -92, + 76, + -32, + -73 + ], + [ + -31, + 73, + 81, + -72 + ], + [ + 103, + -40, + 122, + -77 + ], + [ + -41, + -6, + -126, + 96 + ] + ], + [ + [ + 78, + 84, + -83, + 96 + ], + [ + 26, + 109, + 24, + -34 + ], + [ + -21, + -101, + -126, + -30 + ], + [ + 75, + 120, + -4, + -114 + ] + ], + [ + [ + -92, + -23, + 57, + -80 + ], + [ + 15, + -34, + 24, + -56 + ], + [ + -113, + 106, + 57, + -92 + ], + [ + -25, + 106, + -43, + -72 + ] + ] + ] + ] +} \ No newline at end of file diff --git a/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_1.json b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_1.json new file mode 100644 index 000000000..7c3de2e81 --- /dev/null +++ b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/placeholder_1.json @@ -0,0 +1,175 @@ +{ + "type": "int32", + "data": [ + [ + [ + [ + 102, + -100, + -23, + -24, + -93, + 76, + -17, + 109 + ], + [ + 95, + -92, + 16, + 37, + -31, + 29, + -42, + 11 + ], + [ + -48, + -64, + 58, + -79, + -52, + 53, + 108, + -54 + ], + [ + 16, + -89, + -62, + -126, + 7, + -25, + -68, + 15 + ] + ], + [ + [ + 89, + -20, + 100, + -106, + 11, + 112, + 96, + -3 + ], + [ + -73, + -1, + 110, + 70, + -128, + -116, + 65, + 107 + ], + [ + 44, + -105, + 12, + -31, + -29, + 19, + -15, + 108 + ], + [ + 11, + -11, + -43, + -109, + 27, + 44, + 116, + -120 + ] + ], + [ + [ + 97, + -88, + 106, + 69, + -24, + -106, + 30, + -37 + ], + [ + -115, + -106, + 38, + 120, + 121, + 18, + -39, + -63 + ], + [ + -108, + -101, + -120, + -76, + -30, + 84, + -27, + -91 + ], + [ + 10, + 49, + 36, + 9, + -39, + -102, + -27, + 101 + ] + ], + [ + [ + -6, + 106, + 96, + -66, + -103, + 15, + 125, + -122 + ], + [ + -38, + 117, + 33, + 35, + -123, + 54, + -83, + 127 + ], + [ + -32, + -47, + 118, + 86, + -126, + -3, + -19, + -3 + ], + [ + -126, + 103, + 79, + 28, + 125, + -82, + 103, + 96 + ] + ] + ] + ] +} \ No newline at end of file diff --git a/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/test_matmul_1x4x4x4_qi8.json b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/test_matmul_1x4x4x4_qi8.json new file mode 100644 index 000000000..3ec30fd7e --- /dev/null +++ b/frameworks/tflite/operators/fully_connected_1x4x4x4_qi8/test_matmul_1x4x4x4_qi8.json @@ -0,0 +1,1084 @@ +{ + version: { + _major: 0, + _minor: 30, + _patch: 0, + _draft: false + }, + blocks: [ + { + name: "main", + operators: [ + { + op: "CONST", + attribute_type: "NONE", + inputs: [ + + ], + outputs: [ + "layer_0" + ] + }, + { + op: "CONST", + attribute_type: "NONE", + inputs: [ + + ], + outputs: [ + "layer_1" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 4, + 4 + ] + }, + inputs: [ + "TosaInput_0" + ], + outputs: [ + "layer_2" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 0, + 0, + 0 + ], + size: [ + 1, + 4, + 4 + ] + }, + inputs: [ + "layer_2" + ], + outputs: [ + "layer_3" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 1, + 0, + 0 + ], + size: [ + 1, + 4, + 4 + ] + }, + inputs: [ + "layer_2" + ], + outputs: [ + "layer_4" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 2, + 0, + 0 + ], + size: [ + 1, + 4, + 4 + ] + }, + inputs: [ + "layer_2" + ], + outputs: [ + "layer_5" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 3, + 0, + 0 + ], + size: [ + 1, + 4, + 4 + ] + }, + inputs: [ + "layer_2" + ], + outputs: [ + "layer_6" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 4, + 8 + ] + }, + inputs: [ + "TosaInput_1" + ], + outputs: [ + "layer_7" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 0, + 0, + 0 + ], + size: [ + 1, + 4, + 8 + ] + }, + inputs: [ + "layer_7" + ], + outputs: [ + "layer_8" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 1, + 0, + 0 + ], + size: [ + 1, + 4, + 8 + ] + }, + inputs: [ + "layer_7" + ], + outputs: [ + "layer_9" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 2, + 0, + 0 + ], + size: [ + 1, + 4, + 8 + ] + }, + inputs: [ + "layer_7" + ], + outputs: [ + "layer_10" + ] + }, + { + op: "SLICE", + attribute_type: "SliceAttribute", + attribute: { + start: [ + 3, + 0, + 0 + ], + size: [ + 1, + 4, + 8 + ] + }, + inputs: [ + "layer_7" + ], + outputs: [ + "layer_11" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 8 + ] + }, + inputs: [ + "layer_8" + ], + outputs: [ + "layer_12" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 8 + ] + }, + inputs: [ + "layer_9" + ], + outputs: [ + "layer_13" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 8 + ] + }, + inputs: [ + "layer_10" + ], + outputs: [ + "layer_14" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 8 + ] + }, + inputs: [ + "layer_11" + ], + outputs: [ + "layer_15" + ] + }, + { + op: "TRANSPOSE", + attribute_type: "TransposeAttribute", + attribute: { + perms: [ + 1, + 0 + ] + }, + inputs: [ + "layer_12" + ], + outputs: [ + "layer_16" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 4 + ] + }, + inputs: [ + "layer_3" + ], + outputs: [ + "layer_17" + ] + }, + { + op: "FULLY_CONNECTED", + attribute_type: "FullyConnectedAttribute", + attribute: { + input_zp: -1, + weight_zp: -1 + }, + inputs: [ + "layer_17", + "layer_16", + "layer_1" + ], + outputs: [ + "layer_18" + ] + }, + { + op: "RESCALE", + attribute_type: "RescaleAttribute", + attribute: { + input_zp: 0, + output_zp: 9, + multiplier: [ + 1706807265 + ], + shift: [ + 39 + ], + scale32: true, + double_round: true, + per_channel: false + }, + inputs: [ + "layer_18" + ], + outputs: [ + "layer_19" + ] + }, + { + op: "TRANSPOSE", + attribute_type: "TransposeAttribute", + attribute: { + perms: [ + 1, + 0 + ] + }, + inputs: [ + "layer_13" + ], + outputs: [ + "layer_20" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 4 + ] + }, + inputs: [ + "layer_4" + ], + outputs: [ + "layer_21" + ] + }, + { + op: "FULLY_CONNECTED", + attribute_type: "FullyConnectedAttribute", + attribute: { + input_zp: -1, + weight_zp: -1 + }, + inputs: [ + "layer_21", + "layer_20", + "layer_1" + ], + outputs: [ + "layer_22" + ] + }, + { + op: "RESCALE", + attribute_type: "RescaleAttribute", + attribute: { + input_zp: 0, + output_zp: 9, + multiplier: [ + 1706807265 + ], + shift: [ + 39 + ], + scale32: true, + double_round: true, + per_channel: false + }, + inputs: [ + "layer_22" + ], + outputs: [ + "layer_23" + ] + }, + { + op: "TRANSPOSE", + attribute_type: "TransposeAttribute", + attribute: { + perms: [ + 1, + 0 + ] + }, + inputs: [ + "layer_14" + ], + outputs: [ + "layer_24" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 4 + ] + }, + inputs: [ + "layer_5" + ], + outputs: [ + "layer_25" + ] + }, + { + op: "FULLY_CONNECTED", + attribute_type: "FullyConnectedAttribute", + attribute: { + input_zp: -1, + weight_zp: -1 + }, + inputs: [ + "layer_25", + "layer_24", + "layer_1" + ], + outputs: [ + "layer_26" + ] + }, + { + op: "RESCALE", + attribute_type: "RescaleAttribute", + attribute: { + input_zp: 0, + output_zp: 9, + multiplier: [ + 1706807265 + ], + shift: [ + 39 + ], + scale32: true, + double_round: true, + per_channel: false + }, + inputs: [ + "layer_26" + ], + outputs: [ + "layer_27" + ] + }, + { + op: "TRANSPOSE", + attribute_type: "TransposeAttribute", + attribute: { + perms: [ + 1, + 0 + ] + }, + inputs: [ + "layer_15" + ], + outputs: [ + "layer_28" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 4, + 4 + ] + }, + inputs: [ + "layer_6" + ], + outputs: [ + "layer_29" + ] + }, + { + op: "FULLY_CONNECTED", + attribute_type: "FullyConnectedAttribute", + attribute: { + input_zp: -1, + weight_zp: -1 + }, + inputs: [ + "layer_29", + "layer_28", + "layer_1" + ], + outputs: [ + "layer_30" + ] + }, + { + op: "RESCALE", + attribute_type: "RescaleAttribute", + attribute: { + input_zp: 0, + output_zp: 9, + multiplier: [ + 1706807265 + ], + shift: [ + 39 + ], + scale32: true, + double_round: true, + per_channel: false + }, + inputs: [ + "layer_30" + ], + outputs: [ + "layer_31" + ] + }, + { + op: "CONCAT", + attribute_type: "AxisAttribute", + attribute: { + axis: 0 + }, + inputs: [ + "layer_19", + "layer_23", + "layer_27", + "layer_31" + ], + outputs: [ + "layer_32" + ] + }, + { + op: "RESHAPE", + attribute_type: "ReshapeAttribute", + attribute: { + new_shape: [ + 1, + 4, + 4, + 8 + ] + }, + inputs: [ + "layer_32" + ], + outputs: [ + "TosaOutput_0" + ] + } + ], + tensors: [ + { + name: "TosaInput_0", + shape: [ + 1, + 4, + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "TosaInput_1", + shape: [ + 1, + 4, + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "TosaOutput_0", + shape: [ + 1, + 4, + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_0", + shape: [ + 2 + ], + type: "INT32", + data: [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + name: "layer_1", + shape: [ + 8 + ], + type: "INT32", + data: [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + }, + { + name: "layer_10", + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_11", + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_12", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_13", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_14", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_15", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_16", + shape: [ + 8, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_17", + shape: [ + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_18", + shape: [ + 4, + 8 + ], + type: "INT32", + data: [ + + ] + }, + { + name: "layer_19", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_2", + shape: [ + 4, + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_20", + shape: [ + 8, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_21", + shape: [ + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_22", + shape: [ + 4, + 8 + ], + type: "INT32", + data: [ + + ] + }, + { + name: "layer_23", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_24", + shape: [ + 8, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_25", + shape: [ + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_26", + shape: [ + 4, + 8 + ], + type: "INT32", + data: [ + + ] + }, + { + name: "layer_27", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_28", + shape: [ + 8, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_29", + shape: [ + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_3", + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_30", + shape: [ + 4, + 8 + ], + type: "INT32", + data: [ + + ] + }, + { + name: "layer_31", + shape: [ + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_32", + shape: [ + 16, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_4", + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_5", + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_6", + shape: [ + 1, + 4, + 4 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_7", + shape: [ + 4, + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_8", + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + data: [ + + ] + }, + { + name: "layer_9", + shape: [ + 1, + 4, + 8 + ], + type: "INT8", + data: [ + + ] + } + ], + inputs: [ + "TosaInput_0", + "TosaInput_1" + ], + outputs: [ + "TosaOutput_0" + ] + } + ] +} -- cgit v1.2.1