From 0eed305680ade0c48d07f592c4c4a8aaaad077b7 Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Sun, 4 Sep 2022 21:00:10 +0100 Subject: =?UTF-8?q?Optimize=20FP32/16=20Bilinear=20Scale=20Kernel=20for=20?= =?UTF-8?q?Neon=E2=84=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch removes index and weight pre-computations where it's not used and reduces some calculations inside the inner-most loop of Scale. Resolves: COMPMID-5452 Change-Id: Ie149b1b76a90a8cb659ada0f97aef78caf69932f Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/8220 Benchmark: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice Comments-Addressed: Arm Jenkins --- src/core/utils/ScaleUtils.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/core/utils/ScaleUtils.h') diff --git a/src/core/utils/ScaleUtils.h b/src/core/utils/ScaleUtils.h index 3cc986b1db..c09509253c 100644 --- a/src/core/utils/ScaleUtils.h +++ b/src/core/utils/ScaleUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. + * Copyright (c) 2020, 2022 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -53,6 +53,17 @@ inline bool is_align_corners_allowed_sampling_policy(SamplingPolicy sampling_pol { return sampling_policy != SamplingPolicy::CENTER; } + +/** Returns if precomputation of indices and/or weights is required or/not + * + * @param[in] data_layout Data layout + * @param[in] data_type Data type + * @param[in] policy Interpolation policy + * + * @return True if precomputation is required + */ +bool is_precomputation_required(DataLayout data_layout, DataType data_type, InterpolationPolicy policy); + } // namespace scale_utils } // namespace arm_compute #endif /* UTILS_CORE_SCALEUTILS_H */ \ No newline at end of file -- cgit v1.2.1