blob: 3987370d9e5beb83a57f9925fe87a0d83e85edbf [file] [log] [blame]
Pablo Tellof5f34bb2017-08-22 13:34:13 +01001/*
Annop Wongwathanarat11f7d7e2023-01-12 11:35:37 +00002 * Copyright (c) 2017-2021, 2023 Arm Limited.
Pablo Tellof5f34bb2017-08-22 13:34:13 +01003 *
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/runtime/NEON/functions/NEDeconvolutionLayer.h"
25
26#include "arm_compute/core/Helpers.h"
Pablo Tellof5f34bb2017-08-22 13:34:13 +010027#include "arm_compute/core/Utils.h"
Michalis Spyrou780db4e2017-11-23 09:49:51 +000028#include "arm_compute/core/utils/misc/ShapeCalculator.h"
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +010029#include "arm_compute/core/Validate.h"
Georgios Pinitas421405b2018-10-26 19:05:32 +010030#include "arm_compute/runtime/NEON/NEScheduler.h"
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +010031
ramelg01cbbb0382021-09-17 17:36:57 +010032#include "src/common/utils/Log.h"
Sang-Hoon Park68dd25f2020-10-19 16:00:11 +010033#include "src/core/helpers/AutoConfiguration.h"
Pablo Tellof5f34bb2017-08-22 13:34:13 +010034
Michalis Spyrou780db4e2017-11-23 09:49:51 +000035using namespace arm_compute::misc::shape_calculator;
Pablo Tellof5f34bb2017-08-22 13:34:13 +010036
Manuel Bottinif391fff2019-05-15 13:01:26 +010037namespace arm_compute
38{
Manuel Bottini6e10aa32020-04-30 13:28:23 +010039namespace
40{
41PadStrideInfo compute_upsample_info(const PadStrideInfo &info, uint32_t deconv_pad_x, uint32_t deconv_pad_y)
42{
43 const unsigned int pad_left = info.pad_left();
44 const unsigned int pad_right = info.pad_right();
45 const unsigned int pad_top = info.pad_top();
46 const unsigned int pad_bottom = info.pad_bottom();
47 const unsigned int stride_x = info.stride().first;
48 const unsigned int stride_y = info.stride().second;
49
50 // Find the upsampled dimensions and the padding needed for the convolution with stride 1 in order to match output shape
51 unsigned int deconv_pad_left = pad_right > pad_left ? pad_right - pad_left : 0;
52 unsigned int deconv_pad_right = pad_left > pad_right ? pad_left - pad_right : 0;
53 deconv_pad_x -= deconv_pad_left + deconv_pad_right;
54 ARM_COMPUTE_ERROR_ON((deconv_pad_x % 2) != 0);
55 deconv_pad_left += deconv_pad_x / 2;
56 deconv_pad_right += deconv_pad_x / 2;
57
58 unsigned int deconv_pad_top = pad_bottom > pad_top ? pad_bottom - pad_top : 0;
59 unsigned int deconv_pad_bottom = pad_top > pad_bottom ? pad_top - pad_bottom : 0;
60 deconv_pad_y -= deconv_pad_top + deconv_pad_bottom;
61 ARM_COMPUTE_ERROR_ON((deconv_pad_y % 2) != 0);
62 deconv_pad_top += deconv_pad_y / 2;
63 deconv_pad_bottom += deconv_pad_y / 2;
64
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +010065 return PadStrideInfo(stride_x, stride_y, deconv_pad_left, deconv_pad_right, deconv_pad_top, deconv_pad_bottom,
66 DimensionRoundingType::FLOOR);
Manuel Bottini6e10aa32020-04-30 13:28:23 +010067}
68
69} // namespace
70
Pablo Tellof5f34bb2017-08-22 13:34:13 +010071NEDeconvolutionLayer::NEDeconvolutionLayer(std::shared_ptr<IMemoryManager> memory_manager) // NOLINT
72 : _memory_group(std::move(memory_manager)),
Pablo Tellof5f34bb2017-08-22 13:34:13 +010073 _conv_f(),
Michalis Spyrou33a69902018-02-23 15:01:52 +000074 _upsample_f(),
Michalis Spyrouafbc5ff2018-10-03 14:18:19 +010075 _flip_weights(),
Michalis Spyrou780db4e2017-11-23 09:49:51 +000076 _scaled_output(),
Michalis Spyrouafbc5ff2018-10-03 14:18:19 +010077 _weights_flipped(),
Luca Foschianifedefc32020-02-17 17:02:49 +000078 _flip_axis(),
Michele Di Giorgio061dd362018-10-17 17:10:27 +010079 _original_weights(nullptr),
Michalis Spyrou780db4e2017-11-23 09:49:51 +000080 _input(nullptr),
81 _info(),
Annop Wongwathanaratb609c932023-01-16 14:36:45 +000082 _is_prepared(false),
83 _do_upsampling(true)
Pablo Tellof5f34bb2017-08-22 13:34:13 +010084{
85}
86
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +010087Status NEDeconvolutionLayer::validate(const ITensorInfo *input,
88 const ITensorInfo *weights,
89 const ITensorInfo *bias,
90 const ITensorInfo *output,
91 const PadStrideInfo &info,
92 bool enable_fast_math,
93 const WeightsInfo &weights_info)
Alex Gilday27c08ab2018-02-22 11:36:16 +000094{
95 ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights, output);
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +010096 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F32, DataType::F16, DataType::QASYMM8,
97 DataType::QASYMM8_SIGNED);
98 const unsigned int width_idx = get_data_layout_dimension_index(weights->data_layout(), DataLayoutDimension::WIDTH);
99 const unsigned int height_idx =
100 get_data_layout_dimension_index(weights->data_layout(), DataLayoutDimension::HEIGHT);
Manuel Bottinid25af672019-07-10 17:06:12 +0100101 ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(width_idx) < 1);
Viet-Hoa Do019a7d92023-06-27 16:33:57 +0100102 ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(height_idx) < 1);
Freddie Liardet9d061b02021-04-06 15:59:28 +0100103 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(weights, input);
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100104 if (is_data_type_quantized_per_channel(weights->data_type()) && is_data_type_quantized(input->data_type()))
Freddie Liardet9d061b02021-04-06 15:59:28 +0100105 {
106 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(weights, 1, DataType::QSYMM8_PER_CHANNEL);
107 }
108 else
109 {
110 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights);
111 }
Alex Gilday27c08ab2018-02-22 11:36:16 +0000112
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100113 auto out_dims =
114 deconvolution_output_dimensions(input->dimension(width_idx), input->dimension(height_idx),
115 weights->dimension(width_idx), weights->dimension(height_idx), info);
Alex Gilday27c08ab2018-02-22 11:36:16 +0000116
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100117 if (bias != nullptr)
Usama Arif2899e002019-04-16 14:32:25 +0100118 {
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100119 if (is_data_type_quantized_asymmetric(input->data_type()))
Manuel Bottini9f0d5ec2019-08-19 13:31:38 +0100120 {
121 ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(bias, 1, DataType::S32);
122 }
123 else
124 {
125 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, bias);
126 }
Alex Gilday27c08ab2018-02-22 11:36:16 +0000127 }
128
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100129 if (output->tensor_shape().total_size() > 0)
Alex Gilday27c08ab2018-02-22 11:36:16 +0000130 {
131 ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output);
Alex Gilday27c08ab2018-02-22 11:36:16 +0000132
Michele Di Giorgioed5a4922018-09-13 16:22:01 +0100133 const TensorShape output_shape = compute_deconvolution_output_shape(out_dims, *input, *weights);
134
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100135 ARM_COMPUTE_RETURN_ERROR_ON_MSG(output->dimension(Window::DimX) != output_shape.x(),
136 "Output's width is invalid.");
137 ARM_COMPUTE_RETURN_ERROR_ON_MSG(output->dimension(Window::DimY) != output_shape.y(),
138 "Output's height is invalid.");
139 ARM_COMPUTE_RETURN_ERROR_ON_MSG(output->dimension(Window::DimZ) != output_shape.z(),
140 "Output's depth is invalid.");
Alex Gilday27c08ab2018-02-22 11:36:16 +0000141 }
142
Freddie Liardet9d061b02021-04-06 15:59:28 +0100143 uint32_t deconv_pad_x = 0;
144 uint32_t deconv_pad_y = 0;
145 const unsigned int stride_x = info.stride().first;
146 const unsigned int stride_y = info.stride().second;
Pablo Marquez Tello2a0939d2021-01-20 15:02:59 +0000147 // Guard against overflows in compute_deconvolution_upsampled_shape()
Freddie Liardet9d061b02021-04-06 15:59:28 +0100148 const DataLayout data_layout = input->data_layout();
149 const size_t idx_w = get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH);
150 const size_t idx_h = get_data_layout_dimension_index(data_layout, DataLayoutDimension::HEIGHT);
151 const unsigned int out_x = (input->dimension(idx_w) - 1) * stride_x + 1;
152 const unsigned int out_y = (input->dimension(idx_h) - 1) * stride_y + 1;
Pablo Marquez Tello2a0939d2021-01-20 15:02:59 +0000153 ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_w) > out_x);
154 ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_h) > out_y);
155 ARM_COMPUTE_RETURN_ERROR_ON((out_x - weights->dimension(idx_w) + 1) > out_dims.first);
Freddie Liardet9d061b02021-04-06 15:59:28 +0100156 ARM_COMPUTE_RETURN_ERROR_ON((out_y - weights->dimension(idx_h) + 1) > out_dims.second);
Pablo Marquez Tello2a0939d2021-01-20 15:02:59 +0000157
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100158 const TensorShape scale_out_shape = compute_deconvolution_upsampled_shape(*input, *weights, stride_x, stride_y,
159 out_dims, deconv_pad_x, deconv_pad_y);
160 TensorInfo scale_out_info(input->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(scale_out_shape));
Annop Wongwathanaratc4ed2fd2023-02-09 16:33:13 +0000161 const PadStrideInfo upsample_info = compute_upsample_info(info, deconv_pad_x, deconv_pad_y);
162
163 // Do not perform upsampling when the operation uses unit stride in all dimensions
164 const bool do_upsampling = stride_x != 1 || stride_y != 1;
Alex Gilday27c08ab2018-02-22 11:36:16 +0000165
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100166 const unsigned int batches_idx =
167 get_data_layout_dimension_index(weights->data_layout(), DataLayoutDimension::BATCHES);
168 const unsigned int channel_idx =
169 get_data_layout_dimension_index(weights->data_layout(), DataLayoutDimension::CHANNEL);
Manuel Bottinid25af672019-07-10 17:06:12 +0100170 ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(batches_idx) != scale_out_info.dimension(batches_idx));
171 ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(channel_idx) != scale_out_info.dimension(channel_idx));
Alex Gilday27c08ab2018-02-22 11:36:16 +0000172
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100173 if (do_upsampling)
Annop Wongwathanaratc4ed2fd2023-02-09 16:33:13 +0000174 {
175 const PadStrideInfo conv_info(1, 1, 0, 0, 0, 0, DimensionRoundingType::CEIL);
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100176 ARM_COMPUTE_RETURN_ON_ERROR(NEConvolutionLayer::validate(&scale_out_info, weights, bias, output, conv_info,
177 weights_info, Size2D(1U, 1U), ActivationLayerInfo(),
178 enable_fast_math));
Annop Wongwathanaratc4ed2fd2023-02-09 16:33:13 +0000179 }
180 else
181 {
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100182 const PadStrideInfo conv_info(1, 1, upsample_info.pad_left(), upsample_info.pad_right(),
183 upsample_info.pad_top(), upsample_info.pad_bottom(), DimensionRoundingType::CEIL);
184 ARM_COMPUTE_RETURN_ON_ERROR(NEConvolutionLayer::validate(input, weights, bias, output, conv_info, weights_info,
185 Size2D(1U, 1U), ActivationLayerInfo(),
186 enable_fast_math));
Annop Wongwathanaratc4ed2fd2023-02-09 16:33:13 +0000187 }
Alex Gilday27c08ab2018-02-22 11:36:16 +0000188
189 return Status{};
190}
191
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100192void NEDeconvolutionLayer::configure(ITensor *input,
193 const ITensor *weights,
194 const ITensor *bias,
195 ITensor *output,
196 const PadStrideInfo &info,
197 bool enable_fast_math,
198 const WeightsInfo &weights_info)
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100199{
Michele Di Giorgio0c5191c2019-08-15 15:11:45 +0100200 // Perform validation step
Alex Gilday27c08ab2018-02-22 11:36:16 +0000201 ARM_COMPUTE_ERROR_ON_NULLPTR(input, weights, output);
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100202 ARM_COMPUTE_ERROR_THROW_ON(NEDeconvolutionLayer::validate(input->info(), weights->info(),
203 (bias == nullptr) ? nullptr : bias->info(),
204 output->info(), info, enable_fast_math, weights_info));
Annop Wongwathanaratadfcacc2023-03-01 15:19:50 +0000205 ARM_COMPUTE_LOG_PARAMS(input, weights, bias, output, info, enable_fast_math, weights_info);
Manuel Bottinid25af672019-07-10 17:06:12 +0100206
Manuel Bottini6e10aa32020-04-30 13:28:23 +0100207 const DataLayout data_layout = input->info()->data_layout();
208 const unsigned int width_idx = get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH);
209 const unsigned int height_idx = get_data_layout_dimension_index(data_layout, DataLayoutDimension::HEIGHT);
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100210 auto out_dims = deconvolution_output_dimensions(
211 input->info()->dimension(width_idx), input->info()->dimension(height_idx),
212 weights->info()->dimension(width_idx), weights->info()->dimension(height_idx), info);
Manuel Bottini6e10aa32020-04-30 13:28:23 +0100213
214 const TensorShape output_shape = compute_deconvolution_output_shape(out_dims, *input->info(), *weights->info());
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100215
Michele Di Giorgio061dd362018-10-17 17:10:27 +0100216 _input = input;
217 _original_weights = weights;
218 _info = info;
Michele Di Giorgio061dd362018-10-17 17:10:27 +0100219 _is_prepared = false;
Michalis Spyrou780db4e2017-11-23 09:49:51 +0000220
Manuel Bottini6e10aa32020-04-30 13:28:23 +0100221 const unsigned int stride_x = info.stride().first;
222 const unsigned int stride_y = info.stride().second;
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100223
Michalis Spyrouafbc5ff2018-10-03 14:18:19 +0100224 // Output auto initialization if not yet initialized
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100225 auto_init_if_empty(*output->info(), output_shape, 1, input->info()->data_type(),
226 input->info()->quantization_info());
Michalis Spyrouafbc5ff2018-10-03 14:18:19 +0100227
Luca Foschianifedefc32020-02-17 17:02:49 +0000228 _flip_axis.allocator()->init(TensorInfo(TensorShape(2U), 1, DataType::U32));
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100229
Manuel Bottini6e10aa32020-04-30 13:28:23 +0100230 _weights_flipped.allocator()->init(weights->info()->clone()->set_data_layout(data_layout));
231 _flip_weights.configure(weights, &_weights_flipped, &_flip_axis);
Michalis Spyrouafbc5ff2018-10-03 14:18:19 +0100232
Manuel Bottini6e10aa32020-04-30 13:28:23 +0100233 // setup the function to convolve the upscaled output
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100234 uint32_t deconv_pad_x = 0;
235 uint32_t deconv_pad_y = 0;
236 const TensorShape scale_out_shape = compute_deconvolution_upsampled_shape(
237 *input->info(), *weights->info(), stride_x, stride_y, out_dims, deconv_pad_x, deconv_pad_y);
238 const PadStrideInfo upsample_info = compute_upsample_info(info, deconv_pad_x, deconv_pad_y);
Annop Wongwathanaratc4ed2fd2023-02-09 16:33:13 +0000239
240 // Do not perform upsampling when the operation uses unit stride in all dimensions
241 _do_upsampling = stride_x != 1 || stride_y != 1;
Michalis Spyrou780db4e2017-11-23 09:49:51 +0000242
Luca Foschianifedefc32020-02-17 17:02:49 +0000243 // Setup flip axis data
244 _flip_axis.allocator()->allocate();
245 auto axis_data = reinterpret_cast<uint32_t *>(_flip_axis.buffer());
Manuel Bottini6e10aa32020-04-30 13:28:23 +0100246 axis_data[0] = static_cast<uint32_t>(width_idx);
247 axis_data[1] = static_cast<uint32_t>(height_idx);
248
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000249 // Setup convolution and upsampling, if needed
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100250 if (_do_upsampling)
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000251 {
252 _memory_group.manage(&_scaled_output);
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000253
Annop Wongwathanaratc4ed2fd2023-02-09 16:33:13 +0000254 const PadStrideInfo conv_info(1, 1, 0, 0, 0, 0, DimensionRoundingType::CEIL);
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100255 TensorInfo scale_out_info(scale_out_shape, 1, input->info()->data_type(), input->info()->quantization_info());
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000256 scale_out_info.set_data_layout(data_layout);
257 _scaled_output.allocator()->init(scale_out_info);
258
Annop Wongwathanaratc4ed2fd2023-02-09 16:33:13 +0000259 // Minor optimization: In the upsampling step, we do not need to allocate space for the padding in the upsampled image.
260 // The padding amount can be given as input to the convolution layer.
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000261 _upsample_f.configure(input, &_scaled_output, upsample_info);
262
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100263 _conv_f.configure(&_scaled_output, &_weights_flipped, bias, output, conv_info, weights_info, Size2D(1U, 1U),
264 ActivationLayerInfo(), enable_fast_math);
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000265
266 _scaled_output.allocator()->allocate();
267 }
268 else
269 {
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100270 const PadStrideInfo conv_info(1, 1, upsample_info.pad_left(), upsample_info.pad_right(),
271 upsample_info.pad_top(), upsample_info.pad_bottom(), DimensionRoundingType::CEIL);
272 _conv_f.configure(input, &_weights_flipped, bias, output, conv_info, weights_info, Size2D(1U, 1U),
273 ActivationLayerInfo(), enable_fast_math);
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000274 }
Pablo Tellof5f34bb2017-08-22 13:34:13 +0100275}
276
277void NEDeconvolutionLayer::run()
278{
Georgios Pinitas72219332018-06-05 14:56:06 +0100279 prepare();
280
Georgios Pinitasda953f22019-04-02 17:27:03 +0100281 MemoryGroupResourceScope scope_mg(_memory_group);
Michalis Spyrou780db4e2017-11-23 09:49:51 +0000282
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100283 if (_do_upsampling)
Annop Wongwathanaratb609c932023-01-16 14:36:45 +0000284 {
285 _upsample_f.run();
286 }
Georgios Pinitas056b5d92018-02-13 18:50:55 +0000287 _conv_f.run();
Georgios Pinitas72219332018-06-05 14:56:06 +0100288}
289
290void NEDeconvolutionLayer::prepare()
291{
Felix Thomasmathibalanafd38f02023-09-27 17:46:17 +0100292 if (!_is_prepared)
Georgios Pinitas72219332018-06-05 14:56:06 +0100293 {
Michele Di Giorgio061dd362018-10-17 17:10:27 +0100294 ARM_COMPUTE_ERROR_ON(!_original_weights->is_used());
SiCong Liecb14272019-08-20 11:09:11 +0100295
296 // Run weights flipping and mark original weights tensor as unused
297 _weights_flipped.allocator()->allocate();
Luca Foschianifedefc32020-02-17 17:02:49 +0000298 _flip_weights.run();
Michele Di Giorgio061dd362018-10-17 17:10:27 +0100299 _original_weights->mark_as_unused();
300
301 // Prepare convolution
Georgios Pinitas72219332018-06-05 14:56:06 +0100302 _conv_f.prepare();
Michele Di Giorgio061dd362018-10-17 17:10:27 +0100303
Georgios Pinitas72219332018-06-05 14:56:06 +0100304 _is_prepared = true;
305 }
Michele Di Giorgioed5a4922018-09-13 16:22:01 +0100306}
Manuel Bottinic1b76fa2019-06-17 12:04:40 +0100307} // namespace arm_compute