Add DIV to Elementwise layer support at graph level

COMPUTE-12654

Signed-off-by: Alessandro Navone <alessandro.navone@arm.com>
Change-Id: I9e13e24fb3033888a86874528a72425d87b342ec
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5030
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Michele Di Giorgio <michele.digiorgio@arm.com>
diff --git a/arm_compute/graph/TypePrinter.h b/arm_compute/graph/TypePrinter.h
index 62bacae..1037c80 100644
--- a/arm_compute/graph/TypePrinter.h
+++ b/arm_compute/graph/TypePrinter.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -218,6 +218,9 @@
         case EltwiseOperation::Sub:
             os << "Sub";
             break;
+        case EltwiseOperation::Div:
+            os << "Div";
+            break;
         default:
             ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
     }
diff --git a/arm_compute/graph/Types.h b/arm_compute/graph/Types.h
index b891c17..d1c71f8 100644
--- a/arm_compute/graph/Types.h
+++ b/arm_compute/graph/Types.h
@@ -106,6 +106,7 @@
     Sub, /**< Arithmetic subtraction */
     Mul, /**< Arithmetic multiplication */
     Max, /**< Arithmetic maximum */
+    Div, /**< Arithmetic division */
 };
 
 /** Supported Unary Element-wise operations */
diff --git a/arm_compute/graph/backends/FunctionHelpers.h b/arm_compute/graph/backends/FunctionHelpers.h
index ee5dc3e..9830290 100644
--- a/arm_compute/graph/backends/FunctionHelpers.h
+++ b/arm_compute/graph/backends/FunctionHelpers.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -873,6 +873,12 @@
                                         std::string("ElementwiseMaximum"),
                                         input1, input2, output, act_info);
     }
+    else if(eltwise_op == EltwiseOperation::Div)
+    {
+        std::tie(func, func_name) = create_named_function<typename EltwiseFunctions::Division>(
+                                        std::string("ArithmeticDivision"),
+                                        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 f8cb1c1..93d547b 100644
--- a/arm_compute/graph/backends/ValidateHelpers.h
+++ b/arm_compute/graph/backends/ValidateHelpers.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
  *
  * SPDX-License-Identifier: MIT
  *
@@ -694,6 +694,10 @@
     {
         return EltwiseLayerFunctions::ElementwiseMax::validate(input1, input2, output, act_info);
     }
+    else if(eltwise_op == EltwiseOperation::Div)
+    {
+        return EltwiseLayerFunctions::ArithmeticDivision::validate(input1, input2, output, act_info);
+    }
     else
     {
         ARM_COMPUTE_ERROR("Unsupported element-wise operation!");