diff options
author | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-05-26 11:11:32 +0100 |
---|---|---|
committer | Sang-Hoon Park <sang-hoon.park@arm.com> | 2020-06-08 13:58:40 +0000 |
commit | f025a77e99224798cf4a28d7e17aef86d2f5792f (patch) | |
tree | 443e77ca011b3c8aedf901d99669a76c2a06879a /arm_compute/core | |
parent | 238580f09e3e2a1f7144fd7892ce400ce1dabd76 (diff) | |
download | ComputeLibrary-f025a77e99224798cf4a28d7e17aef86d2f5792f.tar.gz |
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 <sang-hoon.park@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3297
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core')
-rw-r--r-- | arm_compute/core/Utils.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 |