aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2020-10-21 15:58:54 +0100
committerSang-Hoon Park <sang-hoon.park@arm.com>2020-11-07 08:07:22 +0000
commitbef7fa27b0d231a8649952f60808132d109b6345 (patch)
tree7543c66a473d90e28b4860986fad77afa5115043 /arm_compute/runtime/CL/functions/CLSoftmaxLayer.h
parentb9531540dadce8331a703c32456f3c9defdfefa9 (diff)
downloadComputeLibrary-bef7fa27b0d231a8649952f60808132d109b6345.tar.gz
COMPMID-3639: (3RDPARTY_UPDATE) Move CL kernels to src
Change-Id: I10d27db788e5086adae1841e3e2441cd9b76ef84 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4310 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLSoftmaxLayer.h')
-rw-r--r--arm_compute/runtime/CL/functions/CLSoftmaxLayer.h37
1 files changed, 25 insertions, 12 deletions
diff --git a/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h b/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h
index fd71f3ed4d..ab10a64de4 100644
--- a/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h
+++ b/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h
@@ -24,7 +24,6 @@
#ifndef ARM_COMPUTE_CLSOFTMAXLAYER_H
#define ARM_COMPUTE_CLSOFTMAXLAYER_H
-#include "arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h"
#include "arm_compute/runtime/CL/CLTensor.h"
#include "arm_compute/runtime/CL/functions/CLPermute.h"
#include "arm_compute/runtime/IFunction.h"
@@ -35,7 +34,11 @@
namespace arm_compute
{
+class CLCompileContext;
+class CLLogits1DMaxShiftExpSumKernel;
+class CLLogits1DNormKernel;
class ICLTensor;
+class ITensorInfo;
/** Basic function to compute a SoftmaxLayer.
*
@@ -57,6 +60,16 @@ class CLSoftmaxLayerGeneric : public IFunction
public:
/** Constructor */
CLSoftmaxLayerGeneric(std::shared_ptr<IMemoryManager> memory_manager = nullptr);
+ /** Prevent instances of this class from being copied */
+ CLSoftmaxLayerGeneric(const CLSoftmaxLayerGeneric &) = delete;
+ /** Prevent instances of this class from being copied */
+ CLSoftmaxLayerGeneric &operator=(const CLSoftmaxLayerGeneric &) = delete;
+ /** Prevent instances of this class to be moved */
+ CLSoftmaxLayerGeneric(CLSoftmaxLayerGeneric &&) = delete;
+ /** Prevent instances of this class to be moved */
+ CLSoftmaxLayerGeneric &operator=(CLSoftmaxLayerGeneric &&) = delete;
+ /** Default destructor */
+ ~CLSoftmaxLayerGeneric();
/** Set the input and output tensors.
*
* @param[in] input Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32 for Softmax and F16/F32 for Log Softmax
@@ -92,17 +105,17 @@ public:
void run() override;
private:
- MemoryGroup _memory_group;
- CLPermute _permute_input;
- CLPermute _permute_output;
- CLLogits1DMaxShiftExpSumKernel _max_shift_exp_sum_kernel;
- CLLogits1DNormKernel _norm_kernel;
- CLTensor _max;
- CLTensor _sum;
- CLTensor _tmp;
- CLTensor _input_permuted;
- CLTensor _output_permuted;
- bool _needs_permute;
+ MemoryGroup _memory_group;
+ CLPermute _permute_input;
+ CLPermute _permute_output;
+ std::unique_ptr<CLLogits1DMaxShiftExpSumKernel> _max_shift_exp_sum_kernel;
+ std::unique_ptr<CLLogits1DNormKernel> _norm_kernel;
+ CLTensor _max;
+ CLTensor _sum;
+ CLTensor _tmp;
+ CLTensor _input_permuted;
+ CLTensor _output_permuted;
+ bool _needs_permute;
};
using CLSoftmaxLayer = CLSoftmaxLayerGeneric<false>;