diff options
author | Giuseppe Rossini <giuseppe.rossini@arm.com> | 2018-08-24 10:24:12 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | 87e896a46a9403813654cadd609960c3b2af87be (patch) | |
tree | e2083418cc808e9acb5078265f1186008d724971 /arm_compute/runtime/CL/functions/CLSoftmaxLayer.h | |
parent | e3d24cee3688b2ddffd5858aba4904bf51398f08 (diff) | |
download | ComputeLibrary-87e896a46a9403813654cadd609960c3b2af87be.tar.gz |
[COMPMID-1353] Add support for 4D Softmax layer on OpenCL
Change-Id: I4342d4240fe5b1aab234c015684a1216c3990a5f
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145631
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLSoftmaxLayer.h')
-rw-r--r-- | arm_compute/runtime/CL/functions/CLSoftmaxLayer.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h b/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h index 34349ed52b..90c99d6569 100644 --- a/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h +++ b/arm_compute/runtime/CL/functions/CLSoftmaxLayer.h @@ -24,6 +24,8 @@ #ifndef __ARM_COMPUTE_CLSOFTMAXLAYER_H__ #define __ARM_COMPUTE_CLSOFTMAXLAYER_H__ +#include "arm_compute/core/CL/kernels/CLFlattenLayerKernel.h" +#include "arm_compute/core/CL/kernels/CLReshapeLayerKernel.h" #include "arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h" #include "arm_compute/runtime/CL/CLMemoryGroup.h" #include "arm_compute/runtime/CL/CLTensor.h" @@ -71,12 +73,29 @@ public: void run() override; private: + /** Utility method to configure the kernels needed to flatten the input + * tensor. + * + * @note This function changes the internal state of this class. In particular, + * it initializes the kernel @p _flatten_kernel and the tensors @p _input_flat and + * @p _output_flat + * + * @param[in] input Original source tensor. + * @param[in] output Original destination tensor. + */ + void configure_flatten_kernel(const ICLTensor *input, const ICLTensor *output); + CLMemoryGroup _memory_group; CLLogits1DMaxShiftExpSumKernel _max_shift_exp_sum_kernel; CLLogits1DNormKernel _norm_kernel; + CLFlattenLayerKernel _flatten_kernel; + CLReshapeLayerKernel _reshape_kernel; CLTensor _max; CLTensor _sum; CLTensor _tmp; + CLTensor _input_flat; + CLTensor _output_flat; + bool _needs_flattening; }; } #endif /* __ARM_COMPUTE_CLSOFTMAXLAYER_H__ */ |