From f025a77e99224798cf4a28d7e17aef86d2f5792f Mon Sep 17 00:00:00 2001 From: Sang-Hoon Park Date: Tue, 26 May 2020 11:11:32 +0100 Subject: COMPMID-3363, COMPMID-3364: Add align_corners support to nearest neighbor - Both NEON and CL's Scale Kernel now supports aligned corners with nearest neighbor interpolation - Unsupported combination (center sampling policy with aligned corners) now fails on validation - Test suites for CL and NEON are pruned by removing unsupported combination Change-Id: Ieea4f145a131593b89b471dcec2b09619136b17c Signed-off-by: Sang-Hoon Park Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3297 Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins --- arm_compute/core/Utils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arm_compute/core/Utils.h') diff --git a/arm_compute/core/Utils.h b/arm_compute/core/Utils.h index eff6157b1f..481dab3526 100644 --- a/arm_compute/core/Utils.h +++ b/arm_compute/core/Utils.h @@ -991,6 +991,17 @@ QuantizationInfo get_softmax_output_quantization_info(DataType input_type, bool */ float calculate_resize_ratio(size_t input_size, size_t output_size, bool align_corners = false); +/** Returns if aligned corners are allowed for the given sampling policy + * + * @param[in] sampling_policy The sampling policy to consider + * + * @return True if aligned corners are allowed + */ +inline bool is_align_corners_allowed(SamplingPolicy sampling_policy) +{ + return sampling_policy != SamplingPolicy::CENTER; +} + /** Returns a pair of minimum and maximum values for a quantized activation * * @param[in] act_info The information for activation -- cgit v1.2.1