diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-08-28 16:24:56 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:54:54 +0000 |
commit | ea9e0dc18c408fecb6dc482b774bd900dd321610 (patch) | |
tree | b6e67a6559b53b5d4d97f77251d83ac73a6e55a5 /arm_compute | |
parent | 84797636b0ad44c16838df4177cf5a05aa929781 (diff) | |
download | ComputeLibrary-ea9e0dc18c408fecb6dc482b774bd900dd321610.tar.gz |
COMPMID-1469: Add validate in NEGEMMMatrixAdditionKernel
Change-Id: I228e2503eb40c12869fbd7e834ac1309aa613480
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145878
Reviewed-by: Giorgio Arena <giorgio.arena@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/CPP/ICPPSimpleKernel.h | 10 | ||||
-rw-r--r-- | arm_compute/core/NEON/kernels/NEGEMMMatrixAdditionKernel.h | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/arm_compute/core/CPP/ICPPSimpleKernel.h b/arm_compute/core/CPP/ICPPSimpleKernel.h index d8cdc794ef..086c71f776 100644 --- a/arm_compute/core/CPP/ICPPSimpleKernel.h +++ b/arm_compute/core/CPP/ICPPSimpleKernel.h @@ -57,6 +57,16 @@ protected: * @param[in] border_size (Optional) Size of the border. */ void configure(const ITensor *input, ITensor *output, unsigned int num_elems_processed_per_iteration, bool border_undefined = false, const BorderSize &border_size = BorderSize()); + /** Static function to check if given info will lead to a valid configuration of @ref ICPPSimpleKernel. + * + * @param[in] input Source tensor info. + * @param[in] output Destination tensor info. + * @param[in] num_elems_processed_per_iteration Number of processed elements per iteration. + * @param[in] border_undefined (Optional) True if the border mode is undefined. False if it's replicate or constant. + * @param[in] border_size (Optional) Size of the border. + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output, unsigned int num_elems_processed_per_iteration, + bool border_undefined = false, const BorderSize &border_size = BorderSize()); protected: const ITensor *_input; diff --git a/arm_compute/core/NEON/kernels/NEGEMMMatrixAdditionKernel.h b/arm_compute/core/NEON/kernels/NEGEMMMatrixAdditionKernel.h index 1a235933dc..9d74cfce97 100644 --- a/arm_compute/core/NEON/kernels/NEGEMMMatrixAdditionKernel.h +++ b/arm_compute/core/NEON/kernels/NEGEMMMatrixAdditionKernel.h @@ -64,6 +64,17 @@ public: * @param[in] beta Weight of matrix C */ void configure(const ITensor *input, ITensor *output, float beta); + /** Static function to check if given info will lead to a valid configuration of @ref NEGEMMMatrixAdditionKernel. + * + * @note The input and output tensor must have the same dimensions + * + * @param[in] input Input tensor info (Matrix C). Data types supported: F16/F32 + * @param[in] output Output tensor info. If this kernel is used to finalize the GEMM result, output contains the result obtained by the kernel @ref NEGEMMMatrixMultiplyKernel. Data type supported: the same as @p input. + * @param[in] beta Weight of matrix C + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output, float beta); // Inherited methods overridden: void run(const Window &window, const ThreadInfo &info) override; |