diff options
author | Pablo Marquez Tello <pablo.tello@arm.com> | 2023-10-10 11:13:23 +0100 |
---|---|---|
committer | Pablo Marquez Tello <pablo.tello@arm.com> | 2023-10-12 13:53:27 +0000 |
commit | b5cb4d2e3e229b1ca34a1510f4204fc28da7317b (patch) | |
tree | 91e891a3100ee0b70f29b11d29483d19cb3422f6 /src/cpu/kernels/CpuScaleKernel.h | |
parent | aeced744b854758768243833bcdf999c0c3c1a5b (diff) | |
download | ComputeLibrary-b5cb4d2e3e229b1ca34a1510f4204fc28da7317b.tar.gz |
Scale changes to enable fp16 in armv8a multi_isa builds
* Partially resolves MLCE-1102
Change-Id: If050608e56d75649b8d07757604ae10d6fc4269b
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10461
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/cpu/kernels/CpuScaleKernel.h')
-rw-r--r-- | src/cpu/kernels/CpuScaleKernel.h | 51 |
1 files changed, 5 insertions, 46 deletions
diff --git a/src/cpu/kernels/CpuScaleKernel.h b/src/cpu/kernels/CpuScaleKernel.h index 38142df021..f2cad5e899 100644 --- a/src/cpu/kernels/CpuScaleKernel.h +++ b/src/cpu/kernels/CpuScaleKernel.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2022 Arm Limited. + * Copyright (c) 2016-2023 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ARM_COMPUTE_CPU_SCALEKERNEL_H -#define ARM_COMPUTE_CPU_SCALEKERNEL_H +#ifndef ACL_SRC_CPU_KERNELS_CPUSCALEKERNEL_H +#define ACL_SRC_CPU_KERNELS_CPUSCALEKERNEL_H #include "arm_compute/core/KernelDescriptors.h" @@ -40,8 +40,6 @@ class CpuScaleKernel : public ICpuKernel<CpuScaleKernel> { private: /** Scale function to use for the particular function to use */ - using ScaleFunctionPtr = void (CpuScaleKernel::*)( - const ITensor *, ITensor *, const ITensor *, const ITensor *, const ITensor *, const Window &window); using ScaleKernelPtr = std::add_pointer<void(const ITensor *, ITensor *, const ITensor *, @@ -103,46 +101,7 @@ public: static const std::vector<ScaleKernel> &get_available_kernels(); private: -#ifdef ENABLE_NCHW_KERNELS - /** function to perform scale using area interpolation on the given window - * - * @note Used only in case down-sampling. - */ - void scale_area_nchw_u8(const ITensor *src, - ITensor *dst, - const ITensor *dx, - const ITensor *dy, - const ITensor *offsets, - const Window &window); - - /** function to perform scale using bilinear interpolation on the given window */ - template <typename T> - void scale_bilinear_nchw(const ITensor *src, - ITensor *dst, - const ITensor *dx, - const ITensor *dy, - const ITensor *offsets, - const Window &window); - /** function to perform scale using bilinear interpolation on the given window */ - template <typename T> - void scale_bilinear_qasymm(const ITensor *src, - ITensor *dst, - const ITensor *dx, - const ITensor *dy, - const ITensor *offsets, - const Window &window); - - /** function to perform scale using nearest neighbour on the given window */ - template <typename T> - void scale_nearest_nchw(const ITensor *src, - ITensor *dst, - const ITensor *dx, - const ITensor *dy, - const ITensor *offsets, - const Window &window); -#endif // ENABLE_NCHW_KERNELS - - ScaleFunctionPtr _func{nullptr}; + ScaleKernelPtr _nchw_func{nullptr}; InterpolationPolicy _policy{}; BorderMode _border_mode{}; PixelValue _constant_border_value{}; @@ -155,4 +114,4 @@ private: } // namespace kernels } // namespace cpu } // namespace arm_compute -#endif /* ARM_COMPUTE_CPU_SCALEKERNEL_H */ +#endif // ACL_SRC_CPU_KERNELS_CPUSCALEKERNEL_H |