Add graph level convolution fusion with post operator

Resolves: COMPMID-4701

Signed-off-by: Sheri Zhang <sheri.zhang@arm.com>
Change-Id: I8a0d3c2ed4bf84489d94b8ae6641d6041aadaee5
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6557
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-by: SiCong Li <sicong.li@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
diff --git a/arm_compute/graph/Types.h b/arm_compute/graph/Types.h
index 63a9433..e802e9d 100644
--- a/arm_compute/graph/Types.h
+++ b/arm_compute/graph/Types.h
@@ -62,6 +62,7 @@
 using arm_compute::PriorBoxLayerInfo;
 using arm_compute::DimensionRoundingType;
 using arm_compute::InterpolationPolicy;
+using arm_compute::experimental::PostOpType;
 
 using GraphID    = unsigned int;
 using TensorID   = unsigned int;
@@ -145,6 +146,55 @@
     Disabled, /**< Fast math disabled for Convolution layer */
 };
 
+/** Convolution post operator info */
+class ConvPostOpInfo
+{
+public:
+    /** Returns post op type
+     *
+     * @return Post op type
+     */
+    virtual PostOpType type() const = 0;
+    virtual ~ConvPostOpInfo()
+    {
+    }
+};
+
+class ConvPostOpInfoActivation : public ConvPostOpInfo
+{
+public:
+    ConvPostOpInfoActivation(const ActivationLayerInfo &act)
+        : _act(act)
+    {
+    }
+    ~ConvPostOpInfoActivation() override
+    {
+    }
+    PostOpType type() const override
+    {
+        return PostOpType::Activation;
+    }
+    ActivationLayerInfo _act;
+};
+
+class ConvPostOpInfoEltwiseAdd : public ConvPostOpInfo
+{
+public:
+    ConvPostOpInfoEltwiseAdd(int arg_pos, const ConvertPolicy &policy)
+        : _prev_op_dst_pos(arg_pos), _policy(policy)
+    {
+    }
+    PostOpType type() const override
+    {
+        return PostOpType::Eltwise_Add;
+    }
+    ~ConvPostOpInfoEltwiseAdd() override
+    {
+    }
+    int           _prev_op_dst_pos;
+    ConvertPolicy _policy;
+};
+
 /** Supported nodes */
 enum class NodeType
 {
@@ -165,6 +215,7 @@
     FlattenLayer,
     FullyConnectedLayer,
     FusedConvolutionBatchNormalizationLayer,
+    FusedConvolutionWithPostOp,
     FusedDepthwiseConvolutionBatchNormalizationLayer,
     GenerateProposalsLayer,
     L2NormalizeLayer,