IVGCVSW-3888 Add INSTANCE_NORMALIZATION Reference implementation

Signed-off-by: Kevin May <kevin.may@arm.com>
Change-Id: I725022f86e990c482ea323fc90fd136fe493ed68
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp
index 06da776..0d6b16c 100644
--- a/src/backends/reference/RefLayerSupport.cpp
+++ b/src/backends/reference/RefLayerSupport.cpp
@@ -833,6 +833,37 @@
     return true;
 }
 
+bool RefLayerSupport::IsInstanceNormalizationSupported(const TensorInfo& input,
+                                                       const TensorInfo& output,
+                                                       const InstanceNormalizationDescriptor& descriptor,
+                                                       Optional<std::string&> reasonIfUnsupported) const
+{
+    ignore_unused(descriptor);
+    // Define supported types
+    std::array<DataType, 4> supportedTypes =
+        {
+            DataType::Float32,
+            DataType::Float16
+        };
+
+    bool supported = true;
+
+    supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported,
+                                  "Reference Instance Normalization: input type not supported.");
+
+    supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported,
+                                  "Reference Instance Normalization: output type not supported.");
+
+    supported &= CheckSupportRule(TypesAreEqual(input, output), reasonIfUnsupported,
+                                  "Reference Instance Normalization: input and output types mismatched.");
+
+    supported &= CheckSupportRule(ShapesAreSameTotalSize(input, output), reasonIfUnsupported,
+                                  "Reference Instance Normalization: input and output shapes have different "
+                                  "num total elements.");
+
+    return supported;
+}
+
 bool RefLayerSupport::IsL2NormalizationSupported(const TensorInfo& input,
                                                  const TensorInfo& output,
                                                  const L2NormalizationDescriptor& descriptor,