diff options
author | Alex Gilday <alexander.gilday@arm.com> | 2018-03-05 16:22:48 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:16 +0000 |
commit | 60954c671ffdc3422bbdb728fc022eb6896c1e17 (patch) | |
tree | 67f57a6683562bf6611d46cfc409edf32e891ac7 /arm_compute/core/NEON/kernels | |
parent | f47bfb97fa8bc928a7860b84b7b227f716f65e58 (diff) | |
download | ComputeLibrary-60954c671ffdc3422bbdb728fc022eb6896c1e17.tar.gz |
COMPMID-754: Add validation to (De)QuantizationLayers
Change-Id: If8fa1277e8dc5b8e28a8bcad4ff9fc672b00ce9a
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/123275
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Diffstat (limited to 'arm_compute/core/NEON/kernels')
3 files changed, 29 insertions, 0 deletions
diff --git a/arm_compute/core/NEON/kernels/NEDequantizationLayerKernel.h b/arm_compute/core/NEON/kernels/NEDequantizationLayerKernel.h index 25383aa7dc..7ee2078e9e 100644 --- a/arm_compute/core/NEON/kernels/NEDequantizationLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEDequantizationLayerKernel.h @@ -62,6 +62,16 @@ public: * The dimensions over the second must match the batched dimensions of the input tensor. Data type supported: F32 */ void configure(const ITensor *input, ITensor *output, const ITensor *min_max); + /** Static function to check if given info will lead to a valid configuration of @ref NEDequantizationLayerKernel + * + * @param[in] input Input tensor info. Data types supported: U8. + * @param[in] output Output tensor info. Data types supported: F32. + * @param[in] min_max Info for the tensor with shape [2, batches] which stores the minimum and maximum value for each 3D input tensor. + * The dimensions over the second must match the batched dimensions of the input tensor. Data type supported: F32. + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *min_max); // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; diff --git a/arm_compute/core/NEON/kernels/NEMinMaxLayerKernel.h b/arm_compute/core/NEON/kernels/NEMinMaxLayerKernel.h index 592b5941b5..cfc3ee5290 100644 --- a/arm_compute/core/NEON/kernels/NEMinMaxLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEMinMaxLayerKernel.h @@ -65,6 +65,15 @@ public: * The dimensions over the second must match the batched dimensions of the input tensor. Data types supported: F32 */ void configure(const ITensor *input, ITensor *output); + /** Static function to check if given info will lead to a valid configuration of @ref CLMinMaxLayerKernel + * + * @param[in] input Input tensor info. Data types supported: F32. + * @param[in] output Output tensor info with shape [2, batches, ...] which stores the minimum and maximum values for each 3D input tensor. + * The dimensions over the second must match the batched dimensions of the input tensor. Data types supported: F32. + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output); /** Resets global minimum and maximum. */ void reset(); diff --git a/arm_compute/core/NEON/kernels/NEQuantizationLayerKernel.h b/arm_compute/core/NEON/kernels/NEQuantizationLayerKernel.h index 9642ac52a7..e7cf0a8ca4 100644 --- a/arm_compute/core/NEON/kernels/NEQuantizationLayerKernel.h +++ b/arm_compute/core/NEON/kernels/NEQuantizationLayerKernel.h @@ -62,6 +62,16 @@ public: * The dimensions over the second must match the batched dimensions of the input tensor. Data type supported: F32 */ void configure(const ITensor *input, ITensor *output, const ITensor *min_max); + /** Static function to check if given info will lead to a valid configuration of @ref NEQuantizationLayerKernel + * + * @param[in] input Input tensor info. Data types supported: F32. + * @param[in] output Output tensor info. Data types supported: U8. + * @param[in] min_max Info for the tensor with shape [2, batches] which stores the minimum and maximum value for each 3D input tensor. + * The dimensions over the second must match the batched dimensions of the input tensor. Data type supported: F32. + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *min_max); // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; |