blob: 3fc236eaa79c028edb69da6d604543f9ff1999cf [file] [log] [blame]
Gian Marco Iodice9285adb2019-09-05 16:10:27 +01001/*
2 * Copyright (c) 2019 ARM Limited.
3 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
23 */
24#include "arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayerNativeKernel.h"
25
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010026#include "arm_compute/core/CL/CLHelpers.h"
27#include "arm_compute/core/CL/CLKernelLibrary.h"
28#include "arm_compute/core/CL/CLValidate.h"
29#include "arm_compute/core/CL/ICLKernel.h"
30#include "arm_compute/core/CL/ICLTensor.h"
31#include "arm_compute/core/Error.h"
32#include "arm_compute/core/Helpers.h"
Michalis Spyrou6bff1952019-10-02 17:22:11 +010033#include "arm_compute/core/IAccessWindow.h"
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010034#include "arm_compute/core/TensorInfo.h"
35#include "arm_compute/core/Types.h"
36#include "arm_compute/core/Utils.h"
37#include "arm_compute/core/utils/misc/ShapeCalculator.h"
Michele Di Giorgioa046e162019-10-08 09:36:26 +010038#include "arm_compute/core/utils/quantization/AsymmHelpers.h"
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010039
40namespace arm_compute
41{
42namespace
43{
44Status validate_arguments(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const DWCWeightsKernelInfo &dwc_weights_info,
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +010045 const DWCKernelInfo &dwc_info, const PadStrideInfo &conv_info, unsigned int depth_multiplier, const Size2D &dilation,
46 const ITensorInfo *output_multipliers, const ITensorInfo *output_shifts)
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010047{
Michalis Spyrou6bff1952019-10-02 17:22:11 +010048 ARM_COMPUTE_UNUSED(dwc_info);
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010049 ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(input);
50 ARM_COMPUTE_RETURN_ERROR_ON_DATA_LAYOUT_NOT_IN(input, DataLayout::NHWC);
Michele Di Giorgioa046e162019-10-08 09:36:26 +010051 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::F16, DataType::F32);
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010052 ARM_COMPUTE_RETURN_ERROR_ON(depth_multiplier > 1 && dwc_weights_info.n0 != 1);
53 ARM_COMPUTE_RETURN_ERROR_ON(conv_info.stride().first < 1);
54 ARM_COMPUTE_RETURN_ERROR_ON(conv_info.stride().second < 1);
55 ARM_COMPUTE_RETURN_ERROR_ON((dilation.x() < 1) || (dilation.y() < 1));
56 const size_t idx_c = get_data_layout_dimension_index(input->data_layout(), DataLayoutDimension::CHANNEL);
57 ARM_COMPUTE_UNUSED(idx_c);
58 ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_c) != (input->dimension(idx_c) * depth_multiplier));
59
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +010060 const TensorShape output_shape = arm_compute::misc::shape_calculator::compute_depthwise_convolution_shape(*input, *weights, conv_info, depth_multiplier, dilation);
61
62 const bool is_quantized = is_data_type_quantized(input->data_type());
63
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010064 if(biases != nullptr)
65 {
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +010066 ARM_COMPUTE_RETURN_ERROR_ON(biases->dimension(0) != output_shape[idx_c]);
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010067 ARM_COMPUTE_RETURN_ERROR_ON(biases->num_dimensions() > 1);
Michele Di Giorgioa046e162019-10-08 09:36:26 +010068
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +010069 if(is_quantized)
Michele Di Giorgioa046e162019-10-08 09:36:26 +010070 {
71 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(biases, 1, DataType::S32);
72 }
73 else
74 {
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +010075 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, biases);
Michele Di Giorgioa046e162019-10-08 09:36:26 +010076 }
Gian Marco Iodice9285adb2019-09-05 16:10:27 +010077 }
78
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +010079 if(is_quantized)
80 {
81 ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(output_multipliers, output_shifts);
82 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output_multipliers, 1, DataType::S32);
83 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output_shifts, 1, DataType::S32);
84 ARM_COMPUTE_RETURN_ERROR_ON(output_multipliers->num_dimensions() > 1);
85 ARM_COMPUTE_RETURN_ERROR_ON(output_shifts->num_dimensions() > 1);
86
87 if(is_data_type_quantized_per_channel(weights->data_type()))
88 {
89 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(weights, 1, DataType::QSYMM8_PER_CHANNEL);
90 ARM_COMPUTE_RETURN_ERROR_ON(output_shape[idx_c] != output_multipliers->dimension(0));
91 ARM_COMPUTE_RETURN_ERROR_ON(output_shape[idx_c] != output_shifts->dimension(0));
92 }
93 else
94 {
95 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights);
96 ARM_COMPUTE_RETURN_ERROR_ON(1 != output_multipliers->dimension(0));
97 ARM_COMPUTE_RETURN_ERROR_ON(1 != output_shifts->dimension(0));
98 }
99 }
100 else
101 {
102 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights);
103 }
104
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100105 if(output->total_size() != 0)
106 {
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100107 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(output->tensor_shape(), output_shape);
108 }
109
110 return Status{};
111}
112
113std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *weights, ITensorInfo *bias, ITensorInfo *output, const DWCWeightsKernelInfo &dwc_weights_info,
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100114 const DWCKernelInfo &dwc_info, const PadStrideInfo &conv_info, unsigned int depth_multiplier, const Size2D &dilation,
115 ITensorInfo *output_multipliers, ITensorInfo *output_shifts)
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100116{
Michalis Spyrou6bff1952019-10-02 17:22:11 +0100117 ARM_COMPUTE_UNUSED(dwc_info);
118
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100119 // Get convolved dimensions
120 const TensorShape output_shape = arm_compute::misc::shape_calculator::compute_depthwise_convolution_shape(*input, *weights, conv_info, depth_multiplier, dilation);
121
122 auto_init_if_empty(*output, input->clone()->set_tensor_shape(output_shape).set_quantization_info(output->quantization_info()));
123
124 const unsigned int n0 = dwc_weights_info.n0;
125
126 // Configure kernel window
127 Window win = calculate_max_window(*output, Steps(n0));
128
129 // The following access windows are only valid in case of NHWC and because n0 must unit in case depth_multiplier > 1
130 AccessWindowHorizontal input_access(input, 0, n0);
131 AccessWindowHorizontal weights_access(weights, 0, n0);
132 AccessWindowHorizontal output_access(output, 0, n0);
133
134 bool window_changed = false;
135
136 if(bias != nullptr)
137 {
138 AccessWindowHorizontal bias_access(bias, 0, n0);
139 window_changed = update_window_and_padding(win, input_access, weights_access, bias_access, output_access);
140 }
141 else
142 {
143 window_changed = update_window_and_padding(win, input_access, weights_access, output_access);
144 }
145
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100146 if(is_data_type_quantized(input->data_type()))
147 {
148 if((output_multipliers != nullptr) && (output_shifts != nullptr))
149 {
150 AccessWindowHorizontal output_multipliers_access(output_multipliers, 0, n0);
151 AccessWindowHorizontal output_shifts_access(output_shifts, 0, n0);
152 window_changed = window_changed || update_window_and_padding(win, output_multipliers_access, output_shifts_access);
153 }
154 else
155 {
156 Status err = ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "output_multipliers and output_shifts must be non-nullptr for quantized input");
157 return std::make_pair(err, win);
158 }
159 }
160
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100161 output_access.set_valid_region(win, ValidRegion(Coordinates(), output->tensor_shape()));
162
163 Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
164 return std::make_pair(err, win);
165}
166} // namespace
167
168CLDepthwiseConvolutionLayerNativeKernel::CLDepthwiseConvolutionLayerNativeKernel()
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100169 : _input(nullptr),
170 _weights(nullptr),
171 _biases(nullptr),
172 _output(nullptr),
173 _depth_multiplier(1),
174 _output_multipliers(nullptr),
175 _output_shifts(nullptr),
176 _is_quantized(false)
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100177{
178}
179
180void CLDepthwiseConvolutionLayerNativeKernel::configure(const ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const DWCWeightsKernelInfo &dwc_weights_info,
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100181 const DWCKernelInfo &dwc_info, const PadStrideInfo &conv_info, unsigned int depth_multiplier, const Size2D &dilation,
182 const ICLTensor *output_multipliers, const ICLTensor *output_shifts)
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100183{
184 ARM_COMPUTE_ERROR_ON_NULLPTR(input, weights, output);
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100185 ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(input->info(), weights->info(), (biases != nullptr) ? biases->info() : nullptr, output->info(),
186 dwc_weights_info, dwc_info, conv_info, depth_multiplier, dilation,
187 (output_multipliers != nullptr) ? output_multipliers->info() : nullptr, (output_shifts != nullptr) ? output_shifts->info() : nullptr));
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100188
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100189 auto win_config = validate_and_configure_window(input->info(), weights->info(), biases != nullptr ? biases->info() : nullptr, output->info(),
190 dwc_weights_info, dwc_info, conv_info, depth_multiplier, dilation,
191 (output_multipliers != nullptr) ? output_multipliers->info() : nullptr, (output_shifts != nullptr) ? output_shifts->info() : nullptr);
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100192 ARM_COMPUTE_ERROR_THROW_ON(win_config.first);
193
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100194 _input = input;
195 _output = output;
196 _weights = weights;
197 _biases = biases;
198 _depth_multiplier = depth_multiplier;
199 _output_multipliers = output_multipliers;
200 _output_shifts = output_shifts;
201 _is_quantized = is_data_type_quantized(input->info()->data_type());
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100202
203 const size_t idx_w = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::WIDTH);
204 const size_t idx_h = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::HEIGHT);
205 const size_t weights_width = weights->info()->dimension(idx_w);
206 const size_t weights_height = weights->info()->dimension(idx_h);
207
208 CLBuildOptions build_opts;
209 build_opts.add_option_if(_biases != nullptr, "-DHAS_BIAS");
210 build_opts.add_option_if(_input->info()->tensor_shape().total_size_upper(3) > 1, "-DDST_DEPTH=" + support::cpp11::to_string(static_cast<int>(_output->info()->dimension(2))));
211 build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(_input->info()->data_type()));
212 build_opts.add_option("-DACTIVATION_TYPE=" + lower_string(string_from_activation_func(dwc_info.activation_info.activation())));
213 build_opts.add_option("-DDEPTH_MULTIPLIER=" + support::cpp11::to_string(depth_multiplier));
214 build_opts.add_option("-DN0=" + support::cpp11::to_string(dwc_weights_info.n0));
215 build_opts.add_option("-DSRC_DIM1=" + support::cpp11::to_string(_input->info()->dimension(1)));
216 build_opts.add_option("-DSRC_DIM2=" + support::cpp11::to_string(_input->info()->dimension(2)));
217 build_opts.add_option("-DKERNEL_WIDTH=" + support::cpp11::to_string(weights_width));
218 build_opts.add_option("-DKERNEL_HEIGHT=" + support::cpp11::to_string(weights_height));
219 build_opts.add_option("-DCONV_PAD_TOP=" + support::cpp11::to_string(conv_info.pad_top()));
220 build_opts.add_option("-DCONV_PAD_LEFT=" + support::cpp11::to_string(conv_info.pad_left()));
221 build_opts.add_option("-DCONV_STRIDE_X=" + support::cpp11::to_string(conv_info.stride().first));
222 build_opts.add_option("-DCONV_STRIDE_Y=" + support::cpp11::to_string(conv_info.stride().second));
223 build_opts.add_option("-DDILATION_X=" + support::cpp11::to_string(dilation.x()));
224 build_opts.add_option("-DDILATION_Y=" + support::cpp11::to_string(dilation.y()));
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100225
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100226 std::string kernel_name = (_is_quantized) ? "dwc_MxN_native_quantized8_nhwc" : "dwc_MxN_native_fp_nhwc";
Michele Di Giorgioa046e162019-10-08 09:36:26 +0100227
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100228 if(_is_quantized)
Michele Di Giorgioa046e162019-10-08 09:36:26 +0100229 {
230 const UniformQuantizationInfo iq_info = _input->info()->quantization_info().uniform();
231 const UniformQuantizationInfo wq_info = _weights->info()->quantization_info().uniform();
232 const UniformQuantizationInfo oq_info = _output->info()->quantization_info().uniform();
233
Michele Di Giorgioa046e162019-10-08 09:36:26 +0100234 build_opts.add_option("-DINPUT_OFFSET=" + support::cpp11::to_string(-iq_info.offset));
235 build_opts.add_option("-DWEIGHTS_OFFSET=" + support::cpp11::to_string(-wq_info.offset));
236 build_opts.add_option("-DOUTPUT_OFFSET=" + support::cpp11::to_string(oq_info.offset));
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100237 build_opts.add_option_if(is_data_type_quantized_per_channel(weights->info()->data_type()), "-DPER_CHANNEL_QUANTIZATION");
Michele Di Giorgioa046e162019-10-08 09:36:26 +0100238
239 if(dwc_info.activation_info.enabled())
240 {
241 const int a_val = quantize_qasymm8(dwc_info.activation_info.a(), oq_info);
242 const int b_val = quantize_qasymm8(dwc_info.activation_info.b(), oq_info);
243 const int o1 = oq_info.offset;
244
245 build_opts.add_option("-DA_VAL=" + support::cpp11::to_string(a_val));
246 build_opts.add_option("-DB_VAL=" + support::cpp11::to_string(b_val));
247 build_opts.add_option("-DCONST_0=" + support::cpp11::to_string(o1));
248
249 const float s1 = iq_info.scale;
250 build_opts.add_option("-DS1_VAL=" + float_to_string_with_full_precision(s1));
251 build_opts.add_option("-DO1_VAL=" + support::cpp11::to_string(o1));
252 }
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100253
254 build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(input->info()->data_type()));
255 build_opts.add_option("-DWEIGHTS_TYPE=" + get_cl_type_from_data_type(weights->info()->data_type()));
Michele Di Giorgioa046e162019-10-08 09:36:26 +0100256 }
257 else
258 {
259 build_opts.add_option_if(dwc_info.activation_info.enabled(), "-DA_VAL=" + float_to_string_with_full_precision(dwc_info.activation_info.a()));
260 build_opts.add_option_if(dwc_info.activation_info.enabled(), "-DB_VAL=" + float_to_string_with_full_precision(dwc_info.activation_info.b()));
261 }
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100262
263 ICLKernel::configure_internal(win_config.second);
264 _kernel = static_cast<cl::Kernel>(CLKernelLibrary::get().create_kernel(kernel_name, build_opts.options()));
265
266 // Set config_id for enabling LWS tuning
267 _config_id = kernel_name;
268 _config_id += "_";
269 _config_id += support::cpp11::to_string(input->info()->dimension(0));
270 _config_id += "_";
271 _config_id += support::cpp11::to_string(input->info()->dimension(1));
272 _config_id += "_";
273 _config_id += support::cpp11::to_string(input->info()->dimension(2));
274 _config_id += "_";
275 _config_id += support::cpp11::to_string(output->info()->dimension(0));
276 _config_id += "_";
277 _config_id += support::cpp11::to_string(output->info()->dimension(1));
278 _config_id += "_";
279 _config_id += support::cpp11::to_string(output->info()->dimension(2));
280 _config_id += "_";
281 _config_id += string_from_data_type(input->info()->data_type());
282}
283
284Status CLDepthwiseConvolutionLayerNativeKernel::validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output,
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100285 const DWCWeightsKernelInfo &dwc_weights_info, const DWCKernelInfo &dwc_info, const PadStrideInfo &conv_info,
286 unsigned int depth_multiplier, const Size2D &dilation, const ITensorInfo *output_multipliers, const ITensorInfo *output_shifts)
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100287{
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100288 ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(input, weights, biases, output, dwc_weights_info, dwc_info, conv_info, depth_multiplier, dilation, output_multipliers, output_shifts));
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100289 ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(input->clone().get(), weights->clone().get(),
290 biases != nullptr ? biases->clone().get() : nullptr,
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100291 output->clone().get(), dwc_weights_info, dwc_info, conv_info, depth_multiplier, dilation,
292 output_multipliers != nullptr ? output_multipliers->clone().get() : nullptr,
293 output_shifts != nullptr ? output_shifts->clone().get() : nullptr)
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100294 .first);
295
296 return Status{};
297}
298
299void CLDepthwiseConvolutionLayerNativeKernel::run(const Window &window, cl::CommandQueue &queue)
300{
301 ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this);
302 ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window);
303
304 // Collapse window
305 Window window_collapsed = window.collapse(ICLKernel::window(), Window::DimZ);
306 Window slice_in = window.first_slice_window_4D();
307 Window slice_out = window_collapsed.first_slice_window_4D();
308
309 if(_depth_multiplier != 1)
310 {
311 ARM_COMPUTE_ERROR_ON(slice_out.x().step() != 1);
312 slice_out.set(Window::DimX, Window::Dimension(0, _input->info()->tensor_shape()[0], 1));
313 }
314
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100315 unsigned int idx = 2 * num_arguments_per_4D_tensor() + num_arguments_per_3D_tensor();
316
317 // Set output multipliers in case of quantized data type
318 if(_is_quantized)
319 {
320 add_1D_tensor_argument(idx, _output_multipliers, slice_in);
321 add_1D_tensor_argument(idx, _output_shifts, slice_in);
322 }
323
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100324 if(_biases != nullptr)
325 {
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100326 add_1D_tensor_argument(idx, _biases, slice_in);
327 }
328
329 do
330 {
Michele Di Giorgiodf4cf572019-10-09 15:32:39 +0100331 idx = 0;
Gian Marco Iodice9285adb2019-09-05 16:10:27 +0100332 add_4D_tensor_argument(idx, _input, slice_in);
333 add_4D_tensor_argument(idx, _output, slice_out);
334 add_3D_tensor_argument(idx, _weights, slice_out);
335 enqueue(queue, *this, slice_out, lws_hint());
336 }
337 while(window_collapsed.slide_window_slice_4D(slice_out) && window.slide_window_slice_4D(slice_in));
338}
339} // namespace arm_compute