diff options
author | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-10-21 00:04:14 +0100 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-11-03 15:10:47 +0000 |
commit | ebcebf1dee7f8314976b1e0cabd62b4cf893d765 (patch) | |
tree | 95d3e691a0e88a3e213a1d30446a9224497f2055 /arm_compute/runtime/NEON/functions/NESoftmaxLayer.h | |
parent | da4b1b2055d96aaf73704eb9b0b82d74dc2d699c (diff) | |
download | ComputeLibrary-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/NESoftmaxLayer.h')
-rw-r--r-- | arm_compute/runtime/NEON/functions/NESoftmaxLayer.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h b/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h index 20b20201d5..40fa38afde 100644 --- a/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h +++ b/arm_compute/runtime/NEON/functions/NESoftmaxLayer.h @@ -24,16 +24,19 @@ #ifndef ARM_COMPUTE_NESOFTMAXLAYER_H #define ARM_COMPUTE_NESOFTMAXLAYER_H -#include "arm_compute/core/NEON/kernels/NEFillBorderKernel.h" -#include "arm_compute/core/NEON/kernels/NESoftmaxLayerKernel.h" #include "arm_compute/runtime/IFunction.h" #include "arm_compute/runtime/MemoryGroup.h" #include "arm_compute/runtime/NEON/functions/NEPermute.h" #include "arm_compute/runtime/Tensor.h" +#include <memory> namespace arm_compute { class ITensor; +class NELogits1DMaxKernel; +template <bool IS_LOG> +class NELogits1DSoftmaxKernel; +class NEFillBorderKernel; /** Basic function to compute a SoftmaxLayer and a Log SoftmaxLayer. * @@ -64,6 +67,8 @@ public: NESoftmaxLayerGeneric &operator=(const NESoftmaxLayerGeneric &) = delete; /** Default move assignment operator */ NESoftmaxLayerGeneric &operator=(NESoftmaxLayerGeneric &&) = default; + /** Default destructor */ + ~NESoftmaxLayerGeneric(); /** Set the input and output tensors. * * @param[in,out] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. If the width is not a @@ -91,17 +96,17 @@ public: void run() override; private: - MemoryGroup _memory_group; - NEPermute _permute_input; - NEPermute _permute_output; - NELogits1DMaxKernel _max_kernel; - NELogits1DSoftmaxKernel<IS_LOG> _softmax_kernel; - NEFillBorderKernel _fill_border_kernel; - Tensor _max; - Tensor _tmp; - Tensor _input_permuted; - Tensor _output_permuted; - bool _needs_permute; + MemoryGroup _memory_group; + NEPermute _permute_input; + NEPermute _permute_output; + std::unique_ptr<NELogits1DMaxKernel> _max_kernel; + std::unique_ptr<NELogits1DSoftmaxKernel<IS_LOG>> _softmax_kernel; + std::unique_ptr<NEFillBorderKernel> _fill_border_kernel; + Tensor _max; + Tensor _tmp; + Tensor _input_permuted; + Tensor _output_permuted; + bool _needs_permute; }; using NESoftmaxLayer = NESoftmaxLayerGeneric<false>; |