aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h
diff options
context:
space:
mode:
authorTeresa Charlin <teresa.charlinreyes@arm.com>2021-04-12 13:57:00 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2021-04-13 16:49:28 +0000
commit91b7f7423a97f0ae713a13182f289621dad17c43 (patch)
treed29db469f9ef98ac6f1ad889dfbe33fff263e427 /arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h
parent598e3a8f32c68129958b9f6a40c684842f708f8a (diff)
downloadComputeLibrary-91b7f7423a97f0ae713a13182f289621dad17c43.tar.gz
Port CLConvertFullyConnectedWeights to new API
* Replace ICLKernel by IClKernel in other unrelated kernels Resolves partially: COMPMID-4187 Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: I173b8f2ac645dbfd7d412f4b058c5c9655c229ee Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5402 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h b/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h
index 75a3d3213e..8892dbad6c 100644
--- a/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h
+++ b/arm_compute/runtime/CL/functions/CLConvertFullyConnectedWeights.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2020 Arm Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,20 +26,33 @@
#include "arm_compute/core/CL/CLKernelLibrary.h"
#include "arm_compute/runtime/CL/CLTensor.h"
-#include "arm_compute/runtime/CL/ICLSimpleFunction.h"
+#include "arm_compute/runtime/IFunction.h"
#include "arm_compute/runtime/ITransformWeights.h"
+#include <memory>
+
namespace arm_compute
{
class CLCompileContext;
-class CLConvertFullyConnectedWeightsKernel;
class ICLTensor;
class ITensorInfo;
-/** Basic function to run @ref CLConvertFullyConnectedWeightsKernel. */
-class CLConvertFullyConnectedWeights : public ICLSimpleFunction
+/** Basic function to run an @ref opencl::kernels::ClConvertFullyConnectedWeightsKernel. */
+class CLConvertFullyConnectedWeights : public IFunction
{
public:
+ /** Constructor */
+ CLConvertFullyConnectedWeights();
+ /** Destructor */
+ ~CLConvertFullyConnectedWeights();
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLConvertFullyConnectedWeights(const CLConvertFullyConnectedWeights &) = delete;
+ /** Default move constructor */
+ CLConvertFullyConnectedWeights(CLConvertFullyConnectedWeights &&) = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ CLConvertFullyConnectedWeights &operator=(const CLConvertFullyConnectedWeights &) = delete;
+ /** Default move assignment operator */
+ CLConvertFullyConnectedWeights &operator=(CLConvertFullyConnectedWeights &&) = default;
/** Initialize the function.
*
* @param[in] input Source weights tensor to convert. Must be 2 dimensional. Data types supported: All.
@@ -69,11 +82,18 @@ public:
* @param[in] data_layout The data layout the weights have been trained in.
*/
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const TensorShape &original_input_shape, DataLayout data_layout);
+
+ // Inherited methods overridden:
+ void run() override;
+
+private:
+ struct Impl;
+ std::unique_ptr<Impl> _impl;
};
namespace weights_transformations
{
-/** Basic function to run @ref CLConvertFullyConnectedWeightsKernel. */
+/** Basic function to manage @ref CLConvertFullyConnectedWeights. */
class CLConvertFullyConnectedWeightsManaged : public ITransformWeights
{
public: