aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-10-21 00:04:14 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2020-11-03 15:10:47 +0000
commitebcebf1dee7f8314976b1e0cabd62b4cf893d765 (patch)
tree95d3e691a0e88a3e213a1d30446a9224497f2055 /arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
parentda4b1b2055d96aaf73704eb9b0b82d74dc2d699c (diff)
downloadComputeLibrary-ebcebf1dee7f8314976b1e0cabd62b4cf893d765.tar.gz
COMPMID-3638: Move NEON kernels
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Change-Id: Ieed3e4bc8be7fef80c90c5094599b477a56fc473 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4285 Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h')
-rw-r--r--arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h b/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
index 21df3c4aef..3ab3d81262 100644
--- a/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
+++ b/arm_compute/runtime/NEON/functions/NEFullyConnectedLayer.h
@@ -26,25 +26,36 @@
#include "arm_compute/runtime/IFunction.h"
-#include "arm_compute/core/NEON/kernels/NEFlattenLayerKernel.h"
-#include "arm_compute/core/NEON/kernels/NETransposeKernel.h"
#include "arm_compute/runtime/MemoryGroup.h"
#include "arm_compute/runtime/NEON/functions/NEConvertFullyConnectedWeights.h"
+#include "arm_compute/runtime/NEON/functions/NEFlattenLayer.h"
#include "arm_compute/runtime/NEON/functions/NEGEMM.h"
#include "arm_compute/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.h"
#include "arm_compute/runtime/Tensor.h"
namespace arm_compute
{
+class NEFlattenLayerKernel;
+
/** Basic function to reshape the weights of Fully Connected layer with NEON. This function calls the following kernels:
*
- * -# @ref NETransposeKernel
- *
* @note The fully connected layer accepts "weights" tensors only with 2 dimensions.
*/
class NEFullyConnectedLayerReshapeWeights : public INESimpleFunctionNoBorder
{
public:
+ /** Constructor */
+ NEFullyConnectedLayerReshapeWeights() = default;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEFullyConnectedLayerReshapeWeights(const NEFullyConnectedLayerReshapeWeights &) = delete;
+ /** Prevent instances of this class from being copied (As this class contains pointers) */
+ NEFullyConnectedLayerReshapeWeights &operator=(const NEFullyConnectedLayerReshapeWeights &) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEFullyConnectedLayerReshapeWeights(NEFullyConnectedLayerReshapeWeights &&) = delete;
+ /** Prevent instances of this class from being moved (As this class contains non movable objects) */
+ NEFullyConnectedLayerReshapeWeights &operator=(NEFullyConnectedLayerReshapeWeights &&) = delete;
+ /** Default destructor */
+ ~NEFullyConnectedLayerReshapeWeights() = default;
/** Set the input and output tensors.
*
* @param[in] input Weights tensor. The weights must be 2 dimensional. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
@@ -122,6 +133,8 @@ public:
NEFullyConnectedLayer &operator=(const NEFullyConnectedLayer &) = delete;
/** Default move assignment operator */
NEFullyConnectedLayer &operator=(NEFullyConnectedLayer &&) = default;
+ /** Default destructor */
+ ~NEFullyConnectedLayer();
/** Set the input and output tensors.
*
* @param[in] input Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32.
@@ -168,7 +181,7 @@ private:
MemoryGroup _memory_group;
IWeightsManager *_weights_manager;
- NEFlattenLayerKernel _flatten_kernel;
+ std::unique_ptr<NEFlattenLayerKernel> _flatten_kernel;
NEConvertFullyConnectedWeights _convert_weights;
weights_transformations::NEConvertFullyConnectedWeightsManaged _convert_weights_managed;
NEFullyConnectedLayerReshapeWeights _reshape_weights_function;