COMPMID-617: Add validation to NEON functions.
Adds validation to:
- NECol2Im
- NEIm2Col
Change-Id: I346298583a6985ea793f71bb4527aa216a5cd4b2
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/110835
Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com <bsgcomp@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
diff --git a/arm_compute/core/NEON/kernels/NECol2ImKernel.h b/arm_compute/core/NEON/kernels/NECol2ImKernel.h
index 93ec37a..960e302 100644
--- a/arm_compute/core/NEON/kernels/NECol2ImKernel.h
+++ b/arm_compute/core/NEON/kernels/NECol2ImKernel.h
@@ -26,6 +26,8 @@
#include "arm_compute/core/NEON/INEKernel.h"
+#include "arm_compute/core/Size2D.h"
+
namespace arm_compute
{
class ITensor;
@@ -71,7 +73,17 @@
* while the rest represent batch of outputs. Data types supported: Same as @p input
* @param[in] convolved_dims Output convolved dimensions.
*/
- void configure(const ITensor *input, ITensor *output, std::pair<unsigned int, unsigned int> convolved_dims);
+ void configure(const ITensor *input, ITensor *output, const Size2D &convolved_dims);
+ /** Static function to check if given info will lead to a valid configuration of @ref NECol2ImKernel
+ *
+ * @param[in] input The input tensor to convert. Data types supported: U8/S8/QS8/QASYMM8/U16/S16/QS16/F16/U32/S32/F32
+ * @param[in] output The output tensor. 3 lower dimensions represent a single output [width, height, OFM],
+ * while the rest represent batch of outputs. Data types supported: Same as @p input
+ * @param[in] convolved_dims Output convolved dimensions.
+ *
+ * @return an error status
+ */
+ static Error validate(const ITensorInfo *input, const ITensorInfo *output, const Size2D &convolved_dims);
// Inherited methods overridden:
void run(const Window &window, const ThreadInfo &info) override;
@@ -93,7 +105,7 @@
Col2ImFunctionPtr _func;
const ITensor *_input;
ITensor *_output;
- std::pair<unsigned int, unsigned int> _convolved_dims;
+ Size2D _convolved_dims;
};
} // namespace arm_compute
#endif /*__ARM_COMPUTE_NECOL2IMKERNEL_H__ */