diff options
Diffstat (limited to 'arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h')
-rw-r--r-- | arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h b/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h index ab550aa52a..b0adb67578 100644 --- a/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLSoftmaxLayerKernel.h @@ -42,6 +42,14 @@ public: * @param[out] output Destination tensor. Data types supported: same as @p input */ void configure(const ICLTensor *input, ICLTensor *output); + /** Static function to check if given info will lead to a valid configuration of @ref CLLogits1DMaxKernel + * + * @param[in] input Source tensor. Data types supported: QS8/QASYMM8/QS16/F16/F32 + * @param[in] output Destination tensor. Data types supported: same as @p input + * + * @return an error status + */ + static Error validate(const ITensorInfo *input, const ITensorInfo *output); }; /** Interface for shifting, exponentiating and summing the logits */ @@ -67,6 +75,16 @@ public: * @param[in] beta (Optional) A scaling factor for the exponent. Defaults to 1.0 */ void configure(const ICLTensor *input, const ICLTensor *max, ICLTensor *output, ICLTensor *sum, float beta = 1.0f); + /** Static function to check if given info will lead to a valid configuration of @ref CLLogits1DShiftExpSumKernel + * + * @param[in] input Source tensor. Data types supported: QS8/QASYMM8/QS16/F16/F32 + * @param[in] max Max values tensor. Data types supported: same as @p input + * @param[in] output Destination tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input + * @param[in] sum Sum of 1D logits tensor. Data types supported: S32 for QASYMM8 @p input, or same as @p input + * + * @return an error status + */ + static Error validate(const ITensorInfo *input, const ITensorInfo *max, const ITensorInfo *output, const ITensorInfo *sum); // Inherited methods overridden: void run(const Window &window, cl::CommandQueue &queue) override; @@ -104,6 +122,16 @@ public: * @param[in] beta (Optional) A scaling factor for the exponent. Defaults to 1.f */ void configure(const ICLTensor *input, ICLTensor *max, ICLTensor *output, ICLTensor *sum, float beta = 1.0f); + /** Static function to check if given info will lead to a valid configuration of @ref CLLogits1DMaxShiftExpSumKernel + * + * @param[in] input Source tensor. Data types supported: QS8/QS16/F16/F32 + * @param[in] max Max values tensor. Data types supported: same as @p input + * @param[in] output Destination tensor. Data types supported: same as @p input + * @param[in] sum Sum of 1D logits tensor. Data types supported: same as @p input + * + * @return an error status + */ + static Error validate(const ITensorInfo *input, const ITensorInfo *max, const ITensorInfo *output, const ITensorInfo *sum); /** Checks if the given size is eligible for parallel reduction * * @note Serial reduction is launched for width < (_grid_size * _serial_vector_size). @@ -152,6 +180,15 @@ public: * @param[in] beta (Optional) A scaling factor for the exponent. (Default = 1.0) */ void configure(const ICLTensor *input, const ICLTensor *sum, ICLTensor *output, float beta = 1.0f); + /** Static function to check if given info will lead to a valid configuration of @ref CLLogits1DNormKernel + * + * @param[in] input Source tensor. Data types supported: QS8/QS16/S32/F16/F32 + * @param[in] sum Sum tensor. Dimensions should be dim(input)-1. Data types supported: same as @p input + * @param[in] output Destination tensor. Data types supported: QASYMM8 for S32 @p input, or same as @p input + * + * @return an error status + */ + static Error validate(const ITensorInfo *input, const ITensorInfo *sum, const ITensorInfo *output); // Inherited methods overridden: void run(const Window &window, cl::CommandQueue &queue) override; |