IVGCVSW-5826 Add per channel tests

 * with Conv2D for tflite parser and delegate
 * with TransposeConv for tflite parser

Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: I8d1ed1f3388c6eace436d0e6fd5869451c6e7830
diff --git a/src/armnnTfLiteParser/test/TransposeConv.cpp b/src/armnnTfLiteParser/test/TransposeConv.cpp
index 94e4243..f990941 100644
--- a/src/armnnTfLiteParser/test/TransposeConv.cpp
+++ b/src/armnnTfLiteParser/test/TransposeConv.cpp
@@ -270,4 +270,335 @@
         });
 }
 
+
+struct TransposeConvPerChannelFixture : public ParserFlatbuffersFixture
+{
+    explicit TransposeConvPerChannelFixture()
+    {
+        m_JsonString = R"(
+        {
+            "version": 3,
+            "operator_codes": [
+                {
+                    "builtin_code": "TRANSPOSE_CONV",
+                    "version": 2
+                }
+            ],
+            "subgraphs": [
+                {
+                    "tensors": [
+                        {
+                            "shape": [
+                                1,
+                                4,
+                                4,
+                                2
+                            ],
+                            "type": "INT8",
+                            "buffer": 1,
+                            "name": "input",
+                            "quantization": {
+                                "min": [
+                                    -50.0
+                                ],
+                                "max": [
+                                    49.0
+                                ],
+                                "scale": [
+                                    0.388235
+                                ],
+                                "zero_point": [
+                                    1
+                                ],
+                                "details_type": "NONE",
+                                "quantized_dimension": 0
+                            },
+                            "is_variable": false
+                        },
+                        {
+                            "shape": [
+                                4
+                            ],
+                            "type": "INT32",
+                            "buffer": 2,
+                            "name": "model/conv2d_transpose/stack",
+                            "quantization": {
+                                "details_type": "NONE",
+                                "quantized_dimension": 0
+                            },
+                            "is_variable": false
+                        },
+                        {
+                            "shape": [
+                                8,
+                                2,
+                                2,
+                                2
+                            ],
+                            "type": "INT8",
+                            "buffer": 3,
+                            "name": "model/conv2d_transpose/conv2d_transpose",
+                            "quantization": {
+                                "min": [
+                                    -0.081948,
+                                    -0.379918,
+                                    -0.223632,
+                                    -0.098629,
+                                    -0.386369,
+                                    -0.351057,
+                                    -0.348749,
+                                    -0.264848
+                                ],
+                                "max": [
+                                    0.35091,
+                                    0.229681,
+                                    0.368384,
+                                    0.176761,
+                                    0.353717,
+                                    0.377565,
+                                    0.373713,
+                                    0.30141
+                                ],
+                                "scale": [
+                                    0.002763,
+                                    0.002991,
+                                    0.002901,
+                                    0.001392,
+                                    0.003042,
+                                    0.002973,
+                                    0.002943,
+                                    0.002373
+                                ],
+                                "zero_point": [
+                                    0,
+                                    0,
+                                    0,
+                                    0,
+                                    0,
+                                    0,
+                                    0,
+                                    0
+                                ],
+                                "details_type": "NONE",
+                                "quantized_dimension": 0
+                            },
+                            "is_variable": false
+                        },
+                        {
+                            "shape": [
+                                1,
+                                4,
+                                4,
+                                8
+                            ],
+                            "type": "INT8",
+                            "buffer": 4,
+                            "name": "Identity",
+                            "quantization": {
+                                "min": [
+                                    -63.578175
+                                ],
+                                "max": [
+                                    69.305023
+                                ],
+                                "scale": [
+                                    0.521111
+                                ],
+                                "zero_point": [
+                                    -6
+                                ],
+                                "details_type": "NONE",
+                                "quantized_dimension": 0
+                            },
+                            "is_variable": false
+                        }
+                    ],
+                    "inputs": [
+                        0
+                    ],
+                    "outputs": [
+                        3
+                    ],
+                    "operators": [
+                        {
+                            "opcode_index": 0,
+                            "inputs": [
+                                1,
+                                2,
+                                0
+                            ],
+                            "outputs": [
+                                3
+                            ],
+                            "builtin_options_type": "TransposeConvOptions",
+                            "builtin_options": {
+                                "padding": "SAME",
+                                "stride_w": 1,
+                                "stride_h": 1
+                            },
+                            "custom_options_format": "FLEXBUFFERS"
+                        }
+                    ],
+                    "name": "main"
+                }
+            ],
+            "description": "MLIR Converted.",
+            "buffers": [
+                {
+                },
+                {
+                },
+                {
+                    "data": [
+                        1,
+                        0,
+                        0,
+                        0,
+                        4,
+                        0,
+                        0,
+                        0,
+                        4,
+                        0,
+                        0,
+                        0,
+                        8,
+                        0,
+                        0,
+                        0
+                    ]
+                },
+                {
+                    "data": [
+                        13,
+                        239,
+                        7,
+                        125,
+                        35,
+                        127,
+                        55,
+                        226,
+                        77,
+                        150,
+                        159,
+                        192,
+                        180,
+                        129,
+                        51,
+                        48,
+                        108,
+                        9,
+                        21,
+                        179,
+                        12,
+                        39,
+                        127,
+                        107,
+                        44,
+                        206,
+                        127,
+                        185,
+                        108,
+                        82,
+                        86,
+                        218,
+                        38,
+                        149,
+                        16,
+                        1,
+                        129,
+                        163,
+                        116,
+                        136,
+                        138,
+                        43,
+                        65,
+                        186,
+                        154,
+                        138,
+                        64,
+                        127,
+                        120,
+                        127,
+                        207,
+                        70,
+                        43,
+                        33,
+                        141,
+                        137,
+                        93,
+                        215,
+                        65,
+                        92,
+                        122,
+                        144,
+                        120,
+                        127
+                    ]
+                },
+                {
+                },
+                {
+                    "data": [
+                        49,
+                        46,
+                        57,
+                        46,
+                        48,
+                        0,
+                        0,
+                        0,
+                        0,
+                        0,
+                        0,
+                        0,
+                        0,
+                        0,
+                        0,
+                        0
+                    ]
+                }
+              ],
+            "metadata": [
+                {
+                    "name": "min_runtime_version",
+                    "buffer": 5
+                }
+            ]
+        }
+        )";
+        SetupSingleInputSingleOutput("input", "Identity");
+    }
+};
+
+BOOST_FIXTURE_TEST_CASE( ParseTransposeConvPerChannel, TransposeConvPerChannelFixture )
+{
+    RunTest<4, armnn::DataType::QAsymmS8>(
+        0,
+        {
+            -11, 40,-26, 11,-28,  8,  0, -8,
+            -10, 34, 47,  0,-33,-14, 28, 35,
+              6,-28,-26,  8, 13, 33,-31,-41,
+             31,-20,-31,-16,  8,-18,-44,  0
+        },
+        {
+            -8,-17, -8, -9,-16,  1,  2,-11,
+             3,-16,-19,-12,-11, -6, -3, -6,
+            -5, -8,-16,-12,-11, -3, -7,-13,
+            -4,  1, -9,-10, -5,-12, -5, -8,
+             2,-25, -5, -6,-20, -7,  2,-21,
+             1,  4,  5,-13,-10,-12,  3,  4,
+           -10,-17,-17, -6, -7, 12,-22,-17,
+           -17,  0, -5,-14,-21,-12, 17,-13,
+             3, -6, -3, -3, -2,-16,-11,-12,
+           -15,-14, -1, -2,-35,  5,-18,  0,
+            -6,  8,  5,-12, 12,  7, -6, -3,
+            11,-28,-28, -3,-18,-29, -5,-13,
+           -12, 11, -2, -5,  6, -9, -6,  7,
+            -9,-11,-14, -2, 12,  5,-21,-23,
+            -4, -4, -6, -6,-21,-25,  0,-18,
+           -26, 10, -7,-13,  3, 39,-39, -4
+        });
+}
+
 BOOST_AUTO_TEST_SUITE_END()