aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/Scale.cpp
diff options
context:
space:
mode:
authorSang-Hoon Park <sang-hoon.park@arm.com>2020-05-26 11:11:32 +0100
committerSang-Hoon Park <sang-hoon.park@arm.com>2020-06-08 13:58:40 +0000
commitf025a77e99224798cf4a28d7e17aef86d2f5792f (patch)
tree443e77ca011b3c8aedf901d99669a76c2a06879a /tests/validation/reference/Scale.cpp
parent238580f09e3e2a1f7144fd7892ce400ce1dabd76 (diff)
downloadComputeLibrary-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 'tests/validation/reference/Scale.cpp')
-rw-r--r--tests/validation/reference/Scale.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/validation/reference/Scale.cpp b/tests/validation/reference/Scale.cpp
index 73fe21cbf1..06bc42004f 100644
--- a/tests/validation/reference/Scale.cpp
+++ b/tests/validation/reference/Scale.cpp
@@ -46,13 +46,9 @@ SimpleTensor<T> scale_core(const SimpleTensor<T> &in, float scale_x, float scale
shape_scaled.set(1, (in.shape()[1] + round_value) * scale_y);
SimpleTensor<T> out(shape_scaled, in.data_type());
- const auto needs_align_corners = policy == InterpolationPolicy::BILINEAR
- && sampling_policy == SamplingPolicy::TOP_LEFT
- && align_corners;
-
// Compute the ratio between source width/height and destination width/height
- const auto wr = arm_compute::calculate_resize_ratio(in.shape()[0], out.shape()[0], needs_align_corners);
- const auto hr = arm_compute::calculate_resize_ratio(in.shape()[1], out.shape()[1], needs_align_corners);
+ const auto wr = arm_compute::calculate_resize_ratio(in.shape()[0], out.shape()[0], align_corners);
+ const auto hr = arm_compute::calculate_resize_ratio(in.shape()[1], out.shape()[1], align_corners);
const auto width = static_cast<int>(in.shape().x());
const auto height = static_cast<int>(in.shape().y());