From c26179810823bb36375111f4a5485a6475fc97c5 Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Wed, 20 May 2020 22:13:47 +0100 Subject: COMPMID-3363: Create ScaleKernelInfo NEScaleKernel and NEScale are modified to use the new kernel descriptor. Change-Id: I32e3e2a5209a38f5bf32c43f64b2aa4430825988 Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3239 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- arm_compute/runtime/NEON/functions/NEScale.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arm_compute/runtime') diff --git a/arm_compute/runtime/NEON/functions/NEScale.h b/arm_compute/runtime/NEON/functions/NEScale.h index 75acb96b55..5350d0646c 100644 --- a/arm_compute/runtime/NEON/functions/NEScale.h +++ b/arm_compute/runtime/NEON/functions/NEScale.h @@ -58,6 +58,13 @@ public: */ void configure(ITensor *input, ITensor *output, InterpolationPolicy policy, BorderMode border_mode, PixelValue constant_border_value = PixelValue(), SamplingPolicy sampling_policy = SamplingPolicy::CENTER, bool use_padding = true, bool align_corners = false); + /** Initialize the function's source, destination, interpolation type and border_mode. + * + * @param[in, out] input Source tensor. Data type supported: U8/S16/F16/F32. (Written to only for @p border_mode != UNDEFINED) + * @param[out] output Destination tensor. Data type supported: Same as @p input. All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane. + * @param[in] info @ref ScaleKernelInfo to be used for configuration + */ + void configure(ITensor *input, ITensor *output, const ScaleKernelInfo &info); /** Static function to check if given info will lead to a valid configuration of @ref NEScale * * @param[in] input Source tensor. Data type supported: U8/S16/F16/F32. (Written to only for @p border_mode != UNDEFINED) @@ -73,6 +80,15 @@ public: */ static Status validate(const ITensorInfo *input, const ITensorInfo *output, InterpolationPolicy policy, BorderMode border_mode, PixelValue constant_border_value = PixelValue(), SamplingPolicy sampling_policy = SamplingPolicy::CENTER, bool use_padding = true, bool align_corners = false); + /** Static function to check if given info will lead to a valid configuration of @ref NEScale + * + * @param[in] input Source tensor. Data type supported: U8/S16/F16/F32. (Written to only for @p border_mode != UNDEFINED) + * @param[in] output Destination tensor. Data type supported: Same as @p input. All but the lowest two dimensions must be the same size as in the input tensor, i.e. scaling is only performed within the XY-plane. + * @param[in] info @ref ScaleKernelInfo to be used for validation + * + * @return a status + */ + static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ScaleKernelInfo &info); // Inherited methods overridden: void run() override; -- cgit v1.2.1