From 995f55252dfaaa5b64075b96272ae11e23d6ca9b Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Mon, 29 Jan 2018 13:43:35 +0000 Subject: COMPMID-864 Window::collapse_if_possible() is misused in several CL kernels Removed unnecessary collapse_if_possible() calls. Change-Id: I6f3434bc4a26470c4de5bac4e3d90b4b019c2c9c Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/117993 Reviewed-by: Michalis Spyrou Tested-by: Jenkins Reviewed-by: Georgios Pinitas --- src/core/NEON/kernels/NEDequantizationLayerKernel.cpp | 4 +--- src/core/NEON/kernels/NEMinMaxLayerKernel.cpp | 3 +-- src/core/NEON/kernels/NEQuantizationLayerKernel.cpp | 4 +--- src/core/NEON/kernels/NEReshapeLayerKernel.cpp | 3 +-- 4 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src/core/NEON/kernels') diff --git a/src/core/NEON/kernels/NEDequantizationLayerKernel.cpp b/src/core/NEON/kernels/NEDequantizationLayerKernel.cpp index 70984f0a75..be211b2cb2 100644 --- a/src/core/NEON/kernels/NEDequantizationLayerKernel.cpp +++ b/src/core/NEON/kernels/NEDequantizationLayerKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -78,13 +78,11 @@ void NEDequantizationLayerKernel::run(const Window &window, const ThreadInfo &in ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(INEKernel::window(), window); Window window_input_output(window); - window_input_output.collapse_if_possible(INEKernel::window(), 3); window_input_output.set(3, Window::Dimension(0, 1, 1)); Window window_min_max; window_min_max.use_tensor_dimensions(_min_max->info()->tensor_shape()); window_min_max.set(Window::DimX, Window::Dimension(0, 1, 1)); - window_min_max.collapse_if_possible(INEKernel::window(), 1); Iterator input(_input, window_input_output); Iterator output(_output, window_input_output); diff --git a/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp b/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp index a81725fe84..01be36b1c6 100644 --- a/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp +++ b/src/core/NEON/kernels/NEMinMaxLayerKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -96,7 +96,6 @@ void NEMinMaxLayerKernel::run(const Window &window, const ThreadInfo &info) // First one will use vector operations, second one processes the left over pixels Window window_input(window); window_input.set(Window::DimX, Window::Dimension(0, 1, 1)); - window_input.collapse_if_possible(INEKernel::window(), 3); window_input.set(3, Window::Dimension(0, 1, 1)); Iterator input(_input, window_input); diff --git a/src/core/NEON/kernels/NEQuantizationLayerKernel.cpp b/src/core/NEON/kernels/NEQuantizationLayerKernel.cpp index bff79f0f0c..767af08d0d 100644 --- a/src/core/NEON/kernels/NEQuantizationLayerKernel.cpp +++ b/src/core/NEON/kernels/NEQuantizationLayerKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -77,13 +77,11 @@ void NEQuantizationLayerKernel::run(const Window &window, const ThreadInfo &info ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(INEKernel::window(), window); Window window_input_output(window); - window_input_output.collapse_if_possible(INEKernel::window(), 3); window_input_output.set(3, Window::Dimension(0, 1, 1)); Window window_min_max; window_min_max.use_tensor_dimensions(_min_max->info()->tensor_shape()); window_min_max.set(Window::DimX, Window::Dimension(0, 1, 1)); - window_min_max.collapse_if_possible(INEKernel::window(), 1); Iterator input(_input, window_input_output); Iterator output(_output, window_input_output); diff --git a/src/core/NEON/kernels/NEReshapeLayerKernel.cpp b/src/core/NEON/kernels/NEReshapeLayerKernel.cpp index a0f324ef18..45ba68d9fa 100644 --- a/src/core/NEON/kernels/NEReshapeLayerKernel.cpp +++ b/src/core/NEON/kernels/NEReshapeLayerKernel.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -46,7 +46,6 @@ inline void reshape_tensor(const Window &window, const ITensor *input, ITensor * const TensorShape &output_shape = output->info()->tensor_shape(); Coordinates output_coord{}; - window.collapse_if_possible(window, 3); Iterator in(input, window); execute_window_loop(window, [&](const Coordinates & id) -- cgit v1.2.1