IVGCVSW-5328-5329 Fuse Activation

 * Added Fused Activation Optimization to both CL and Neon backends.
 * Added Fused Activation support to all the CL and Neon workloads
   that support it.
 * Changed ProfilingTest network to be a Convolution layer
   followed by an Abs layer rather than an Activation layer.
 * Added IBackendInternal::OptimizeSubgraphView function that can accept a
   ModelOptions.
 * Network will now call OptimizeSubgraphView passing in the ModelOptions.

Signed-off-by: Keith Davis <keith.davis@arm.com>
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Ib536ac3cbafc7d9b35c139ad9a65b7735262cd9d
diff --git a/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp b/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp
index 8704b12..53f1684 100644
--- a/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp
+++ b/src/backends/cl/workloads/ClDepthwiseConvolutionWorkload.cpp
@@ -8,11 +8,13 @@
 #include <ResolveType.hpp>
 #include "ClWorkloadUtils.hpp"
 
+#include <armnn/Exceptions.hpp>
 #include <aclCommon/ArmComputeUtils.hpp>
 #include <aclCommon/ArmComputeTensorUtils.hpp>
 #include <cl/ClTensorHandle.hpp>
 #include <backendsCommon/CpuTensorHandle.hpp>
 #include <backendsCommon/WorkloadUtils.hpp>
+#include <backendsCommon/WorkloadData.hpp>
 
 #include <arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h>
 
@@ -25,7 +27,8 @@
                                                            const TensorInfo& output,
                                                            const DepthwiseConvolution2dDescriptor& descriptor,
                                                            const TensorInfo& weights,
-                                                           const Optional<TensorInfo>& biases)
+                                                           const Optional<TensorInfo>& biases,
+                                                           const ActivationDescriptor* activationDescriptor)
 {
     const arm_compute::TensorInfo aclInputInfo  = BuildArmComputeTensorInfo(input,  descriptor.m_DataLayout);
     const arm_compute::TensorInfo aclOutputInfo = BuildArmComputeTensorInfo(output, descriptor.m_DataLayout);
@@ -56,13 +59,16 @@
             descriptor.m_DilationX,
             descriptor.m_DilationY);
 
+    const arm_compute::ActivationLayerInfo activationInfo = ConvertActivationDescriptorToAclActivationLayerInfo(
+            activationDescriptor);
+
     return arm_compute::CLDepthwiseConvolutionLayer::validate(&aclInputInfo,
                                                               &aclWeightsInfo,
                                                               optionalAclBiasesInfo,
                                                               &aclOutputInfo,
                                                               aclPadStrideInfo,
                                                               aclDepthMultiplier,
-                                                              arm_compute::ActivationLayerInfo(),
+                                                              activationInfo,
                                                               aclDilationInfo);
 
 }
@@ -114,6 +120,8 @@
 
     arm_compute::PadStrideInfo padStrideInfo = BuildArmComputePadStrideInfo(m_Data.m_Parameters);
 
+    const arm_compute::ActivationLayerInfo activationInfo = ConvertAdditionalInfoToAclActivationLayerInfo(descriptor);
+
     m_DepthwiseConvolutionLayer = std::make_unique<arm_compute::CLDepthwiseConvolutionLayer>();
     static_cast<arm_compute::CLDepthwiseConvolutionLayer*>(m_DepthwiseConvolutionLayer.get())->configure(
         &input,
@@ -122,7 +130,7 @@
         &output,
         padStrideInfo,
         depthMultiplier,
-        arm_compute::ActivationLayerInfo(),
+        activationInfo,
         aclDilationInfo);
 
     ARMNN_ASSERT(m_DepthwiseConvolutionLayer);