Clean up header inclusion in CL workloads.
authorMatthew Bentham <Matthew.Bentham@arm.com>
Wed, 5 Feb 2020 21:39:55 +0000 (21:39 +0000)
committerMatthew Bentham <matthew.bentham@arm.com>
Mon, 10 Feb 2020 13:29:08 +0000 (13:29 +0000)
Remove usage of CLFunctions.h and replace with specific header
for each function.

Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
Change-Id: I255a843b36a5dd8cf90a52786282192b8fe04f83

32 files changed:
src/backends/cl/workloads/ClActivationWorkload.hpp
src/backends/cl/workloads/ClAdditionWorkload.hpp
src/backends/cl/workloads/ClBatchNormalizationFloatWorkload.hpp
src/backends/cl/workloads/ClBatchToSpaceNdWorkload.hpp
src/backends/cl/workloads/ClConcatWorkload.cpp
src/backends/cl/workloads/ClConcatWorkload.hpp
src/backends/cl/workloads/ClConstantWorkload.hpp
src/backends/cl/workloads/ClConvertFp16ToFp32Workload.hpp
src/backends/cl/workloads/ClConvertFp32ToFp16Workload.hpp
src/backends/cl/workloads/ClDivisionFloatWorkload.hpp
src/backends/cl/workloads/ClFloorFloatWorkload.hpp
src/backends/cl/workloads/ClFullyConnectedWorkload.hpp
src/backends/cl/workloads/ClGreaterWorkload.hpp
src/backends/cl/workloads/ClL2NormalizationFloatWorkload.hpp
src/backends/cl/workloads/ClLstmFloatWorkload.hpp
src/backends/cl/workloads/ClMaximumWorkload.hpp
src/backends/cl/workloads/ClMeanWorkload.hpp
src/backends/cl/workloads/ClMinimumWorkload.hpp
src/backends/cl/workloads/ClMultiplicationWorkload.hpp
src/backends/cl/workloads/ClNormalizationFloatWorkload.hpp
src/backends/cl/workloads/ClPooling2dWorkload.hpp
src/backends/cl/workloads/ClPreluWorkload.hpp
src/backends/cl/workloads/ClReshapeWorkload.hpp
src/backends/cl/workloads/ClResizeWorkload.hpp
src/backends/cl/workloads/ClSoftmaxFloatWorkload.hpp
src/backends/cl/workloads/ClSoftmaxUint8Workload.hpp
src/backends/cl/workloads/ClSplitterWorkload.cpp
src/backends/cl/workloads/ClSplitterWorkload.hpp
src/backends/cl/workloads/ClStackWorkload.hpp
src/backends/cl/workloads/ClStridedSliceWorkload.hpp
src/backends/cl/workloads/ClSubtractionWorkload.hpp
src/backends/cl/workloads/ClWorkloadUtils.hpp

index 4fdd497..3516633 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLActivationLayer.h>
 
 namespace armnn
 {
index 7a0228d..62bd0ae 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLElementwiseOperations.h>
 
 namespace armnn
 {
index cdd679b..e94bef2 100644 (file)
@@ -7,7 +7,8 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/CLTensor.h>
+#include <arm_compute/runtime/CL/functions/CLBatchNormalizationLayer.h>
 
 namespace armnn
 {
index 4db84a2..881b294 100644 (file)
@@ -6,7 +6,7 @@
 #pragma once
 
 #include <backendsCommon/Workload.hpp>
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLBatchToSpaceLayer.h>
 
 namespace armnn
 {
index fb28946..5370466 100644 (file)
@@ -10,6 +10,7 @@
 #include <cl/ClLayerSupport.hpp>
 
 #include <arm_compute/core/Types.h>
+#include <arm_compute/runtime/CL/functions/CLConcatenateLayer.h>
 
 #include <boost/polymorphic_pointer_cast.hpp>
 
@@ -78,14 +79,15 @@ ClConcatWorkload::ClConcatWorkload(const ConcatQueueDescriptor& descriptor, cons
                                                                          m_Data.m_Outputs[0])->GetTensor();
 
     // Create the layer function
-    m_Layer.reset(new arm_compute::CLConcatenateLayer());
+    auto layer = std::make_unique<arm_compute::CLConcatenateLayer>();
 
     // Configure input and output tensors
     size_t aclAxis = CalcAxis(descriptor.m_Parameters);
-    m_Layer->configure(aclInputs, &output, aclAxis);
+    layer->configure(aclInputs, &output, aclAxis);
 
     // Prepare
-    m_Layer->prepare();
+    layer->prepare();
+    m_Layer = std::move(layer);
 }
 
 void ClConcatWorkload::Execute() const
@@ -97,4 +99,4 @@ void ClConcatWorkload::Execute() const
     }
 }
 
-} //namespace armnn
\ No newline at end of file
+} //namespace armnn
index c34de9f..772bc09 100644 (file)
@@ -7,7 +7,8 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/core/Error.h>
+#include <arm_compute/runtime/IFunction.h>
 
 namespace armnn
 {
@@ -24,7 +25,7 @@ public:
     void Execute() const override;
 
 private:
-    mutable std::unique_ptr<arm_compute::CLConcatenateLayer> m_Layer;
+    mutable std::unique_ptr<arm_compute::IFunction> m_Layer;
 };
 
 } //namespace armnn
index 374831f..75325dc 100644 (file)
@@ -7,8 +7,6 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
-
 namespace armnn
 {
 class ClConstantWorkload : public BaseWorkload<ConstantQueueDescriptor>
index e8c619d..ef5c9b6 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLDepthConvertLayer.h>
 
 namespace armnn
 {
index b817156..6e04e39 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLDepthConvertLayer.h>
 
 namespace armnn
 {
index 754e5b4..ddca87d 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLElementwiseOperations.h>
 
 namespace armnn
 {
index 376ca3e..1ddaddf 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLFloor.h>
 
 namespace armnn
 {
index af672c8..e13436e 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLFullyConnectedLayer.h>
 #include <arm_compute/runtime/MemoryManagerOnDemand.h>
 
 #include <memory>
index 84a24ff..862e168 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLComparison.h>
 
 namespace armnn
 {
index 53bbfc8..26aea9f 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h>
 
 namespace armnn
 {
index ae42d6e..b7cb408 100644 (file)
@@ -10,7 +10,7 @@
 #include <backendsCommon/Workload.hpp>
 #include <backendsCommon/WorkloadData.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLLSTMLayer.h>
 
 namespace armnn
 {
index e8cc5ba..18f67cd 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLElementwiseOperations.h>
 
 namespace armnn
 {
@@ -26,4 +26,4 @@ private:
     mutable arm_compute::CLElementwiseMax m_MaximumLayer;
 };
 
-} //namespace armnn
\ No newline at end of file
+} //namespace armnn
index c46d18b..127c054 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLReduceMean.h>
 
 namespace armnn
 {
index f1e8d12..55d7eea 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLElementwiseOperations.h>
 
 namespace armnn
 {
@@ -26,4 +26,4 @@ private:
     mutable arm_compute::CLElementwiseMin m_MinimumLayer;
 };
 
-} //namespace armnn
\ No newline at end of file
+} //namespace armnn
index 2dd6bfe..732bb16 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h>
 
 namespace armnn
 {
index 4789efc..a6d4f25 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLNormalizationLayer.h>
 
 namespace armnn
 {
index 01c9753..ce67db2 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLPoolingLayer.h>
 
 namespace armnn
 {
index 6ffe4ca..9061416 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLPReluLayer.h>
 
 namespace armnn
 {
index 62f5fcc..d836f1e 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLReshapeLayer.h>
 
 namespace armnn
 {
index 5a128fa..ab5b943 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLScale.h>
 
 namespace armnn
 {
index 0da8dda..7efdae8 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLSoftmaxLayer.h>
 #include <arm_compute/runtime/MemoryManagerOnDemand.h>
 
 #include <memory>
index ea46734..f378b89 100644 (file)
@@ -7,8 +7,8 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
-#include "arm_compute/runtime/MemoryManagerOnDemand.h"
+#include <arm_compute/runtime/CL/functions/CLSoftmaxLayer.h>
+#include <arm_compute/runtime/MemoryManagerOnDemand.h>
 
 #include <memory>
 
index 9bbbcab..296e0a3 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <aclCommon/ArmComputeTensorUtils.hpp>
 #include <aclCommon/ArmComputeUtils.hpp>
+#include <arm_compute/runtime/CL/functions/CLSplit.h>
 #include <backendsCommon/CpuTensorHandle.hpp>
 #include <cl/ClTensorHandle.hpp>
 
@@ -84,7 +85,6 @@ ClSplitterWorkload::ClSplitterWorkload(const SplitterQueueDescriptor& descriptor
     }
 
     // Create the layer function
-    m_Layer.reset(new arm_compute::CLSplit());
 
     // Configure input and output tensors
     std::set<unsigned int> splitAxis = ComputeSplitAxis(descriptor.m_Parameters, m_Data.m_Inputs[0]->GetShape());
@@ -94,10 +94,13 @@ ClSplitterWorkload::ClSplitterWorkload(const SplitterQueueDescriptor& descriptor
     }
 
     unsigned int aclAxis = CalcAclAxis(descriptor.m_Parameters.GetNumDimensions(), *splitAxis.begin());
-    m_Layer->configure(&input, aclOutputs, aclAxis);
+    auto layer = std::make_unique<arm_compute::CLSplit>();
+    layer->configure(&input, aclOutputs, aclAxis);
 
     // Prepare
-    m_Layer->prepare();
+    layer->prepare();
+
+    m_Layer = std::move(layer);
 }
 
 void ClSplitterWorkload::Execute() const
index d024452..82211f5 100644 (file)
@@ -7,7 +7,8 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/core/Error.h>
+#include <arm_compute/runtime/IFunction.h>
 
 #include <functional>
 
@@ -26,7 +27,7 @@ public:
     void Execute() const override;
 
 private:
-    mutable std::unique_ptr<arm_compute::CLSplit> m_Layer;
+    std::unique_ptr<arm_compute::IFunction> m_Layer;
 };
 
 } //namespace armnn
index 7500869..f27d6cd 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLStackLayer.h>
 
 namespace armnn
 {
index 617ec7c..bce3fe1 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLStridedSlice.h>
 
 namespace armnn
 {
index ba89456..da6d17c 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <backendsCommon/Workload.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/functions/CLElementwiseOperations.h>
 
 namespace armnn
 {
index 7093006..d3c6df5 100644 (file)
@@ -12,7 +12,8 @@
 
 #include <armnn/Utils.hpp>
 
-#include <arm_compute/runtime/CL/CLFunctions.h>
+#include <arm_compute/runtime/CL/CLTensor.h>
+#include <arm_compute/runtime/IFunction.h>
 
 #include <sstream>