IVGCVSW-5842 Remove cross-wiring in depthwise

 * Reading tensor infos won't allow a permutation vector anymore.
   The permutation only changed the quantization dimension not the
   shape and was therefore misleading
 * The permutation of the full tensor info is now performed in
   armnnUtils::Permuted
 * Changed TfLite Parser depthwise parsing function
 * Added unit tests to TfLite Parser with more random data
 * Changed TfLite Delegate depthwise parsing function
 * Added unit test to the delegate with per channel quantization

!android-nn-driver:5412

Signed-off-by: Jan Eilers <jan.eilers@arm.com>
Change-Id: I1f985ee69547bcaf16a72201e00a6b6fe1ef9a97
diff --git a/src/armnnUtils/Permute.cpp b/src/armnnUtils/Permute.cpp
index 3770463..7d15f3c 100644
--- a/src/armnnUtils/Permute.cpp
+++ b/src/armnnUtils/Permute.cpp
@@ -113,14 +113,14 @@
 }
 
 armnn::TensorInfo Permuted(const armnn::TensorInfo& info,
-                           const armnn::PermutationVector& mappings,
-                           bool perChannelPermute)
+                           const armnn::PermutationVector& mappings)
 {
     armnn::TensorInfo outInfo(info);
     outInfo.SetShape(Permuted(info.GetShape(), mappings));
 
-    // If TensorInfo has Per-Axis Quantization then permute QuantizationDim to mapping
-    if (info.HasPerAxisQuantization() && perChannelPermute)
+    // If TensorInfo has Per-Axis Quantization then it also has a QuantizationDim which needs to
+    // be permuted according to the mapping
+    if (info.GetQuantizationDim().has_value())
     {
         outInfo.SetQuantizationDim(mappings[info.GetQuantizationDim().value()]);
     }