Add support ElementwiseMax operator in graph API

Signed-off-by: thecha01 <theo.charalambous@arm.com>
Change-Id: I764f1eabb6412350eb719cc755b8777efc7d70a1
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3736
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
diff --git a/arm_compute/graph/backends/FunctionHelpers.h b/arm_compute/graph/backends/FunctionHelpers.h
index af74834..60a03e6 100644
--- a/arm_compute/graph/backends/FunctionHelpers.h
+++ b/arm_compute/graph/backends/FunctionHelpers.h
@@ -798,6 +798,12 @@
                                         std::string("PixelWiseMultiplication"),
                                         input1, input2, output, 1.f, convert_policy, node.rounding_policy(), act_info);
     }
+    else if(eltwise_op == EltwiseOperation::Max)
+    {
+        std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Maximum>(
+                                        std::string("ElementwiseMaximum"),
+                                        input1, input2, output, act_info);
+    }
     else
     {
         ARM_COMPUTE_ERROR("Unsupported element-wise operation!");
diff --git a/arm_compute/graph/backends/ValidateHelpers.h b/arm_compute/graph/backends/ValidateHelpers.h
index c9299838..0aec2ae 100644
--- a/arm_compute/graph/backends/ValidateHelpers.h
+++ b/arm_compute/graph/backends/ValidateHelpers.h
@@ -616,6 +616,10 @@
     {
         return EltwiseLayerFunctions::PixelWiseMultiplication::validate(input1, input2, output, scale, convert_policy, round_policy, act_info);
     }
+    else if(eltwise_op == EltwiseOperation::Max)
+    {
+        return EltwiseLayerFunctions::ElementwiseMax::validate(input1, input2, output, act_info);
+    }
     else
     {
         ARM_COMPUTE_ERROR("Unsupported element-wise operation!");