Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 1 | /* |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2019 ARM Limited. |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 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 | */ |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 24 | #include "arm_compute/runtime/CL/functions/CLDepthwiseConvolutionLayer.h" |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 25 | |
| 26 | #include "arm_compute/core/CL/ICLTensor.h" |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 27 | #include "arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NCHWKernel.h" |
| 28 | #include "arm_compute/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.h" |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 29 | #include "arm_compute/core/Helpers.h" |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 30 | #include "arm_compute/core/PixelValue.h" |
Georgios Pinitas | 9be0c5a | 2018-02-19 12:46:29 +0000 | [diff] [blame] | 31 | #include "arm_compute/core/utils/misc/ShapeCalculator.h" |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 32 | #include "arm_compute/core/utils/quantization/AsymmHelpers.h" |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 33 | #include "arm_compute/runtime/CL/CLScheduler.h" |
| 34 | #include "support/ToolchainSupport.h" |
| 35 | |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 36 | namespace arm_compute |
| 37 | { |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 38 | using namespace arm_compute::misc; |
Georgios Pinitas | 9be0c5a | 2018-02-19 12:46:29 +0000 | [diff] [blame] | 39 | using namespace arm_compute::misc::shape_calculator; |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 40 | |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 41 | CLDepthwiseConvolutionLayer3x3::CLDepthwiseConvolutionLayer3x3(std::shared_ptr<IMemoryManager> memory_manager) |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 42 | : _memory_group(std::move(memory_manager)), _kernel(nullptr), _border_handler(), _permute_input_to_nchw(), _permute_weights_to_nchw(), _permute_output_to_nhwc(), _reshape_weights(), _permuted_input(), |
| 43 | _permuted_weights(), _permuted_output(), _original_weights(nullptr), _needs_permute(false), _needs_weights_reshape(false), _is_prepared(false) |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 44 | { |
| 45 | } |
| 46 | |
Giorgio Arena | 7657224 | 2018-04-04 17:44:26 +0100 | [diff] [blame] | 47 | void CLDepthwiseConvolutionLayer3x3::configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier, |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 48 | ActivationLayerInfo act_info, const Size2D &dilation) |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 49 | { |
Michele Di Giorgio | 933fe86 | 2018-02-19 15:42:12 +0000 | [diff] [blame] | 50 | ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::F16, DataType::F32); |
Georgios Pinitas | 236bfe7 | 2017-11-23 15:59:55 +0000 | [diff] [blame] | 51 | ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights); |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 52 | // idx_w and idx_h only used for validation |
| 53 | const size_t idx_w = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::WIDTH); |
| 54 | const size_t idx_h = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::HEIGHT); |
| 55 | ARM_COMPUTE_UNUSED(idx_w); |
| 56 | ARM_COMPUTE_UNUSED(idx_h); |
| 57 | |
| 58 | ARM_COMPUTE_ERROR_ON(weights->info()->dimension(idx_w) + (weights->info()->dimension(idx_w) - 1) * (dilation.x() - 1) > input->info()->dimension(idx_w) + conv_info.pad_left() + conv_info.pad_right()); |
| 59 | ARM_COMPUTE_ERROR_ON(weights->info()->dimension(idx_h) + (weights->info()->dimension(idx_h) - 1) * (dilation.y() - 1) > input->info()->dimension(idx_h) + conv_info.pad_top() + conv_info.pad_bottom()); |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 60 | |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 61 | const bool is_nhwc = input->info()->data_layout() == DataLayout::NHWC; |
| 62 | |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 63 | _needs_permute = is_nhwc && (depth_multiplier > 1); |
| 64 | _needs_weights_reshape = is_nhwc && (depth_multiplier == 1) |
| 65 | && is_data_type_quantized_asymmetric(input->info()->data_type()); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 66 | _is_prepared = false; |
| 67 | _original_weights = weights; |
| 68 | |
| 69 | ICLTensor *input_to_use = input; |
| 70 | const ICLTensor *weights_to_use = weights; |
| 71 | ICLTensor *output_to_use = output; |
| 72 | |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 73 | const bool is_stride_1 = ((conv_info.stride().first == conv_info.stride().second) && (conv_info.stride().first == 1)); |
| 74 | const bool is_dot8_supported = dot8_supported(CLKernelLibrary::get().get_device()); |
| 75 | const bool is_stride_1_dilation_1 = (is_stride_1 && dilation.x() == 1 && dilation.y() == 1); |
| 76 | |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 77 | DepthwiseConvolutionReshapeInfo info; |
| 78 | info.c0 = 4; |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 79 | info.transpose = is_stride_1_dilation_1 && is_dot8_supported; |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 80 | |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 81 | if(_needs_permute) |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 82 | { |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 83 | _memory_group.manage(&_permuted_input); |
| 84 | _memory_group.manage(&_permuted_output); |
| 85 | |
| 86 | // Configure the function to transform the input tensor from NHWC -> NCHW |
| 87 | _permute_input_to_nchw.configure(input, &_permuted_input, PermutationVector(1U, 2U, 0U)); |
| 88 | _permuted_input.info()->set_data_layout(DataLayout::NCHW); |
| 89 | |
| 90 | // Configure the function to transform the weights tensor from HWI -> IHW |
| 91 | _permute_weights_to_nchw.configure(weights, &_permuted_weights, PermutationVector(1U, 2U, 0U)); |
| 92 | _permuted_weights.info()->set_data_layout(DataLayout::NCHW); |
| 93 | |
| 94 | input_to_use = &_permuted_input; |
| 95 | weights_to_use = &_permuted_weights; |
| 96 | output_to_use = &_permuted_output; |
| 97 | |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 98 | _kernel = arm_compute::support::cpp14::make_unique<CLDepthwiseConvolutionLayer3x3NCHWKernel>(); |
| 99 | } |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 100 | else if(is_nhwc) |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 101 | { |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 102 | if(_needs_weights_reshape) |
| 103 | { |
| 104 | _reshape_weights.configure(weights, &_permuted_weights, info); |
| 105 | weights_to_use = &_permuted_weights; |
| 106 | } |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 107 | _kernel = arm_compute::support::cpp14::make_unique<CLDepthwiseConvolutionLayer3x3NHWCKernel>(); |
| 108 | } |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 109 | else |
| 110 | { |
| 111 | _kernel = arm_compute::support::cpp14::make_unique<CLDepthwiseConvolutionLayer3x3NCHWKernel>(); |
| 112 | } |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 113 | |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 114 | // Configure kernel |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 115 | _kernel->set_target(CLScheduler::get().target()); |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 116 | _kernel->configure(input_to_use, weights_to_use, biases, output_to_use, conv_info, depth_multiplier, act_info, dilation); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 117 | |
| 118 | // Permute output if needed |
| 119 | if(_needs_permute) |
| 120 | { |
| 121 | // Configure the function to transform the convoluted output to ACL's native ordering format NCHW |
Georgios Pinitas | 3f8aac4 | 2018-12-24 13:09:02 +0000 | [diff] [blame] | 122 | _permuted_output.info()->set_data_layout(DataLayout::NCHW); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 123 | _permute_output_to_nhwc.configure(&_permuted_output, output, PermutationVector(2U, 0U, 1U)); |
| 124 | |
| 125 | // Allocate tensors |
| 126 | _permuted_input.allocator()->allocate(); |
| 127 | _permuted_output.allocator()->allocate(); |
| 128 | } |
Diego Lopez Recas | fa0add1 | 2017-11-28 16:44:52 +0000 | [diff] [blame] | 129 | // Configure border handler |
| 130 | PixelValue &&zero_value(0.f); |
| 131 | if(is_data_type_quantized_asymmetric(input->info()->data_type())) |
| 132 | { |
| 133 | zero_value = PixelValue(static_cast<uint8_t>(input->info()->quantization_info().offset)); |
| 134 | } |
Georgios Pinitas | 3f8aac4 | 2018-12-24 13:09:02 +0000 | [diff] [blame] | 135 | _border_handler.configure(input_to_use, _kernel->border_size(), BorderMode::CONSTANT, zero_value); |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 136 | } |
| 137 | |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 138 | Status CLDepthwiseConvolutionLayer3x3::validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 139 | unsigned int depth_multiplier, ActivationLayerInfo act_info, GPUTarget gpu_target, const Size2D &dilation) |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 140 | { |
| 141 | ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights, output); |
Gian Marco Iodice | dff601d | 2018-08-09 13:28:41 +0100 | [diff] [blame] | 142 | ARM_COMPUTE_RETURN_ERROR_ON(input->data_layout() == DataLayout::UNKNOWN); |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 143 | |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 144 | const bool is_nhwc = input->data_layout() == DataLayout::NHWC; |
| 145 | const bool needs_permute = is_nhwc && (depth_multiplier > 1); |
| 146 | const bool needs_weights_reshape = is_nhwc && (depth_multiplier == 1); |
| 147 | const bool is_stride_1 = ((conv_info.stride().first == conv_info.stride().second) && (conv_info.stride().first == 1)); |
| 148 | const bool is_stride_1_dilation_1 = (is_stride_1 && dilation.x() == 1 && dilation.y() == 1); |
| 149 | const bool is_dot8_supported = dot8_supported(CLKernelLibrary::get().get_device()); |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 150 | DepthwiseConvolutionReshapeInfo info; |
| 151 | info.c0 = 4; |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 152 | info.transpose = is_stride_1_dilation_1 && is_dot8_supported; |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 153 | |
| 154 | if(needs_permute) |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 155 | { |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 156 | TensorShape permuted_input_shape = input->tensor_shape(); |
| 157 | TensorShape permuted_weights_shape = weights->tensor_shape(); |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 158 | TensorShape permuted_output_shape = shape_calculator::compute_depthwise_convolution_shape(*input, *weights, conv_info, depth_multiplier, dilation); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 159 | |
| 160 | permute(permuted_input_shape, PermutationVector(1U, 2U, 0U)); |
| 161 | permute(permuted_weights_shape, PermutationVector(1U, 2U, 0U)); |
| 162 | permute(permuted_output_shape, PermutationVector(1U, 2U, 0U)); |
| 163 | |
| 164 | const TensorInfo permuted_input = input->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(permuted_input_shape).set_data_layout(DataLayout::NCHW); |
| 165 | const TensorInfo permuted_weights = weights->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(permuted_weights_shape).set_data_layout(DataLayout::NCHW); |
| 166 | const TensorInfo permuted_output = output->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(permuted_output_shape).set_data_layout(DataLayout::NCHW); |
| 167 | |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 168 | ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseConvolutionLayer3x3NCHWKernel::validate(&permuted_input, &permuted_weights, biases, &permuted_output, conv_info, depth_multiplier, act_info, gpu_target, |
| 169 | dilation)); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 170 | } |
| 171 | else if(is_nhwc) |
| 172 | { |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 173 | if(needs_weights_reshape) |
| 174 | { |
| 175 | auto reshaped_weights_shape = arm_compute::misc::shape_calculator::compute_reshaped_depthwise_weights_shape(*weights, info); |
| 176 | ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseConvolutionLayer3x3NHWCKernel::validate(input, &weights->clone()->set_tensor_shape(reshaped_weights_shape), biases, output, conv_info, depth_multiplier, |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 177 | act_info, dilation)); |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 178 | } |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 179 | ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseConvolutionLayer3x3NHWCKernel::validate(input, weights, biases, output, conv_info, depth_multiplier, act_info, dilation)); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 180 | } |
| 181 | else |
| 182 | { |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 183 | ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseConvolutionLayer3x3NCHWKernel::validate(input, weights, biases, output, conv_info, depth_multiplier, act_info, gpu_target, dilation)); |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 184 | } |
| 185 | |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 186 | return Status{}; |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 187 | } |
| 188 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 189 | void CLDepthwiseConvolutionLayer3x3::run() |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 190 | { |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 191 | prepare(); |
| 192 | |
Georgios Pinitas | da953f2 | 2019-04-02 17:27:03 +0100 | [diff] [blame] | 193 | MemoryGroupResourceScope scope_mg(_memory_group); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 194 | |
| 195 | if(_needs_permute) |
| 196 | { |
| 197 | _permute_input_to_nchw.run(); |
| 198 | } |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 199 | CLScheduler::get().enqueue(_border_handler); |
Giorgio Arena | dfca60b | 2018-01-31 10:30:59 +0000 | [diff] [blame] | 200 | CLScheduler::get().enqueue(*_kernel); |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 201 | |
| 202 | if(_needs_permute) |
| 203 | { |
| 204 | _permute_output_to_nhwc.run(); |
| 205 | } |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 206 | } |
| 207 | |
| 208 | void CLDepthwiseConvolutionLayer3x3::prepare() |
| 209 | { |
| 210 | if(!_is_prepared) |
| 211 | { |
| 212 | if(_needs_permute) |
| 213 | { |
| 214 | ARM_COMPUTE_ERROR_ON(!_original_weights->is_used()); |
| 215 | |
| 216 | _permuted_weights.allocator()->allocate(); |
| 217 | _permute_weights_to_nchw.run(); |
| 218 | _original_weights->mark_as_unused(); |
| 219 | } |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 220 | |
| 221 | if(_needs_weights_reshape) |
| 222 | { |
| 223 | ARM_COMPUTE_ERROR_ON(_needs_permute); |
| 224 | ARM_COMPUTE_ERROR_ON(!_original_weights->is_used()); |
| 225 | _permuted_weights.allocator()->allocate(); |
| 226 | CLScheduler::get().enqueue(_reshape_weights); |
| 227 | _original_weights->mark_as_unused(); |
| 228 | } |
Georgios Pinitas | 05045c1 | 2018-12-07 18:31:47 +0000 | [diff] [blame] | 229 | _is_prepared = true; |
| 230 | } |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 231 | } |
| 232 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 233 | CLDepthwiseConvolutionLayer::CLDepthwiseConvolutionLayer() |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 234 | : _im2col_kernel(), _weights_reshape_kernel(), _v2mm_kernel(), _vector_to_tensor_kernel(), _output_stage_kernel(), _activationlayer_function(), _v2mm_input_fill_border(), _v2mm_weights_fill_border(), |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 235 | _input_reshaped(), _weights_reshaped(), _v2mm_output(), _output_reshaped(), _is_prepared(false), _is_quantized(false), _is_activationlayer_enabled(false), _original_weights(nullptr), |
| 236 | _optimised_function(nullptr) |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 237 | { |
| 238 | } |
| 239 | |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 240 | void CLDepthwiseConvolutionLayer::configure(ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 241 | unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation) |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 242 | { |
Michele Di Giorgio | d24af8a | 2018-05-08 17:23:52 +0100 | [diff] [blame] | 243 | ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::F16, DataType::F32); |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 244 | ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights); |
Giorgio Arena | d051e97 | 2018-06-20 11:46:42 +0100 | [diff] [blame] | 245 | ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_LAYOUT(input, output); |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 246 | |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 247 | const size_t idx_w = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::WIDTH); |
| 248 | const size_t idx_h = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::HEIGHT); |
| 249 | |
Usama Arif | 881f2de | 2019-04-12 10:29:17 +0100 | [diff] [blame] | 250 | ARM_COMPUTE_ERROR_ON(weights->info()->dimension(idx_w) + (weights->info()->dimension(idx_w) - 1) * (dilation.x() - 1) > input->info()->dimension(idx_w) + conv_info.pad_left() + conv_info.pad_right()); |
| 251 | ARM_COMPUTE_ERROR_ON(weights->info()->dimension(idx_h) + (weights->info()->dimension(idx_h) - 1) * (dilation.y() - 1) > input->info()->dimension(idx_h) + conv_info.pad_top() + conv_info.pad_bottom()); |
| 252 | |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 253 | const bool can_run_optimised_3x3_kernel = (weights->info()->dimension(idx_w) == 3) && (weights->info()->dimension(idx_h) == 3); |
| 254 | |
Georgios Pinitas | 3f8aac4 | 2018-12-24 13:09:02 +0000 | [diff] [blame] | 255 | if(bool(can_run_optimised_3x3_kernel)) |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 256 | { |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 257 | auto f = arm_compute::support::cpp14::make_unique<CLDepthwiseConvolutionLayer3x3>(); |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 258 | f->configure(input, weights, biases, output, conv_info, depth_multiplier, act_info, dilation); |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 259 | _optimised_function = std::move(f); |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 260 | } |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 261 | else |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 262 | { |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 263 | const size_t idx_c = get_data_layout_dimension_index(input->info()->data_layout(), DataLayoutDimension::CHANNEL); |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 264 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 265 | const size_t weights_w = weights->info()->dimension(idx_w); |
| 266 | const size_t weights_h = weights->info()->dimension(idx_h); |
| 267 | const size_t weights_z = weights->info()->dimension(idx_c); |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 268 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 269 | _is_prepared = false; |
| 270 | _original_weights = weights; |
| 271 | _is_quantized = is_data_type_quantized_asymmetric(input->info()->data_type()); |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 272 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 273 | bool append_bias = (biases != nullptr) && !_is_quantized; |
| 274 | const GPUTarget gpu_target = CLScheduler::get().target(); |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 275 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 276 | // Calculate output shape |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 277 | TensorShape output_shape = shape_calculator::compute_depthwise_convolution_shape(*input->info(), *weights->info(), conv_info, depth_multiplier, dilation); |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 278 | |
| 279 | // Output auto inizialitation if not yet initialized |
| 280 | auto_init_if_empty(*output->info(), input->info()->clone()->set_tensor_shape(output_shape)); |
| 281 | ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(output->info()->tensor_shape(), output_shape); |
| 282 | |
| 283 | // Output width and height |
| 284 | const unsigned int conv_w = output_shape[idx_w]; |
| 285 | const unsigned int conv_h = output_shape[idx_h]; |
| 286 | |
| 287 | // Set up intermediate tensors |
| 288 | const size_t patch_size = weights_w * weights_h + ((append_bias) ? 1 : 0); |
| 289 | const size_t conv_size = conv_w * conv_h; |
| 290 | |
| 291 | // Im2Col configuration |
| 292 | TensorShape shape_im2col = input->info()->tensor_shape(); |
| 293 | shape_im2col.set(0, patch_size); |
| 294 | shape_im2col.set(1, conv_size); |
| 295 | shape_im2col.set(2, weights_z); |
| 296 | _input_reshaped.allocator()->init(input->info()->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(shape_im2col)); |
| 297 | _im2col_kernel.set_target(gpu_target); |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 298 | _im2col_kernel.configure(input, &_input_reshaped, Size2D(weights_w, weights_h), conv_info, append_bias, depth_multiplier, dilation); |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 299 | CLScheduler::get().tune_kernel_static(_im2col_kernel); |
| 300 | |
| 301 | // Weights reshape configuration |
| 302 | const TensorShape shape_weights_reshape(patch_size, weights_z); |
| 303 | _weights_reshaped.allocator()->init(weights->info()->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(shape_weights_reshape)); |
| 304 | _weights_reshape_kernel.configure(weights, &_weights_reshaped, append_bias ? biases : nullptr); |
| 305 | |
| 306 | // GEMV configuration |
| 307 | DataType v2mm_dt = (input->info()->data_type() == DataType::QASYMM8) ? DataType::S32 : input->info()->data_type(); |
| 308 | TensorShape shape_v2mm_out = input->info()->tensor_shape(); |
| 309 | shape_v2mm_out.set(0, conv_size * weights_z); |
| 310 | shape_v2mm_out.set(1, 1); |
| 311 | shape_v2mm_out.set(2, 1); |
| 312 | _v2mm_output.allocator()->init(input->info()->clone()->set_is_resizable(true).reset_padding().set_data_type(v2mm_dt).set_tensor_shape(shape_v2mm_out)); |
| 313 | _v2mm_kernel.set_target(gpu_target); |
| 314 | _v2mm_kernel.configure(&_input_reshaped, &_weights_reshaped, &_v2mm_output); |
| 315 | CLScheduler::get().tune_kernel_static(_v2mm_kernel); |
| 316 | _output_reshaped.allocator()->init(_v2mm_output.info()->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(output_shape)); |
| 317 | _vector_to_tensor_kernel.configure(&_v2mm_output, (_is_quantized) ? &_output_reshaped : output, conv_w, conv_h); |
| 318 | |
| 319 | // Output staged configuration |
| 320 | if(_is_quantized) |
| 321 | { |
| 322 | const QuantizationInfo output_quant_info = (output->info()->total_size() == 0) ? input->info()->quantization_info() : output->info()->quantization_info(); |
| 323 | |
| 324 | float multiplier = input->info()->quantization_info().scale * weights->info()->quantization_info().scale / output_quant_info.scale; |
Michalis Spyrou | bcfd09a | 2019-05-01 13:03:59 +0100 | [diff] [blame] | 325 | int output_multiplier; |
| 326 | int output_shift; |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 327 | quantization::calculate_quantized_multiplier_less_than_one(multiplier, &output_multiplier, &output_shift); |
| 328 | _output_stage_kernel.configure(&_output_reshaped, biases, output, output_multiplier, output_shift, output_quant_info.offset); |
| 329 | _output_reshaped.allocator()->allocate(); |
| 330 | } |
| 331 | |
| 332 | // Fill borders on inputs |
| 333 | PixelValue zero_in(static_cast<int32_t>(0)); |
| 334 | PixelValue zero_w(static_cast<int32_t>(0)); |
| 335 | if(_is_quantized) |
| 336 | { |
| 337 | zero_in = PixelValue(static_cast<int32_t>(input->info()->quantization_info().offset)); |
| 338 | zero_w = PixelValue(static_cast<int32_t>(weights->info()->quantization_info().offset)); |
| 339 | } |
| 340 | BorderSize border_size = _v2mm_kernel.border_size(); |
| 341 | _v2mm_input_fill_border.configure(&_input_reshaped, border_size, BorderMode::CONSTANT, zero_in); |
| 342 | |
| 343 | border_size.bottom = 0; |
| 344 | _v2mm_weights_fill_border.configure(&_weights_reshaped, border_size, BorderMode::CONSTANT, zero_w); |
| 345 | |
| 346 | // Allocate intermediate tensors |
| 347 | _input_reshaped.allocator()->allocate(); |
| 348 | _v2mm_output.allocator()->allocate(); |
| 349 | |
| 350 | //Configure Activation Layer |
| 351 | _is_activationlayer_enabled = act_info.enabled(); |
| 352 | |
| 353 | if(_is_activationlayer_enabled) |
| 354 | { |
| 355 | _activationlayer_function.configure(output, nullptr, act_info); |
| 356 | } |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 357 | } |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 358 | } |
| 359 | |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 360 | Status CLDepthwiseConvolutionLayer::validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 361 | unsigned int depth_multiplier, const ActivationLayerInfo &act_info, const Size2D &dilation) |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 362 | { |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 363 | const size_t idx_w = get_data_layout_dimension_index(input->data_layout(), DataLayoutDimension::WIDTH); |
| 364 | const size_t idx_h = get_data_layout_dimension_index(input->data_layout(), DataLayoutDimension::HEIGHT); |
| 365 | |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 366 | ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_w) + (weights->dimension(idx_w) - 1) * (dilation.x() - 1) > input->dimension(idx_w) + conv_info.pad_left() + conv_info.pad_right()); |
| 367 | ARM_COMPUTE_RETURN_ERROR_ON(weights->dimension(idx_h) + (weights->dimension(idx_h) - 1) * (dilation.y() - 1) > input->dimension(idx_h) + conv_info.pad_top() + conv_info.pad_bottom()); |
| 368 | |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 369 | const bool can_run_optimised_3x3_kernel = (weights->dimension(idx_w) == 3) && (weights->dimension(idx_h) == 3); |
| 370 | |
| 371 | if(can_run_optimised_3x3_kernel) |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 372 | { |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 373 | const size_t idx_c = get_data_layout_dimension_index(input->data_layout(), DataLayoutDimension::CHANNEL); |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 374 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 375 | ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(input, weights, output); |
| 376 | ARM_COMPUTE_RETURN_ERROR_ON((input->dimension(idx_c) * depth_multiplier) != weights->dimension(idx_c)); |
| 377 | |
| 378 | const bool is_quantized = is_data_type_quantized_asymmetric(input->data_type()); |
| 379 | const bool append_bias = (biases != nullptr) && !is_quantized; |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 380 | const TensorShape output_shape = shape_calculator::compute_depthwise_convolution_shape(*input, *weights, conv_info, depth_multiplier, dilation); |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 381 | const size_t weights_w = weights->dimension(idx_w); |
| 382 | const size_t weights_h = weights->dimension(idx_h); |
| 383 | const size_t weights_z = weights->dimension(idx_c); |
| 384 | const unsigned int conv_w = output_shape[idx_w]; |
| 385 | const unsigned int conv_h = output_shape[idx_h]; |
| 386 | const size_t patch_size = weights_w * weights_h + ((append_bias) ? 1 : 0); |
| 387 | const size_t conv_size = conv_w * conv_h; |
| 388 | |
| 389 | TensorShape shape_im2col = input->tensor_shape(); |
| 390 | shape_im2col.set(0, patch_size); |
| 391 | shape_im2col.set(1, conv_size); |
| 392 | shape_im2col.set(2, weights_z); |
| 393 | TensorInfo input_reshaped(input->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(shape_im2col)); |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 394 | ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseIm2ColKernel::validate(input, &input_reshaped, Size2D(weights_w, weights_h), conv_info, append_bias, depth_multiplier, dilation)); |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 395 | |
| 396 | const TensorShape shape_weights_reshape(patch_size, weights_z); |
| 397 | TensorInfo weights_reshaped(weights->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(shape_weights_reshape)); |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 398 | ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseConvolutionLayerReshapeWeightsGenericKernel::validate(weights, &weights_reshaped, append_bias ? biases : nullptr)); |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 399 | |
| 400 | DataType v2mm_dt = (input->data_type() == DataType::QASYMM8) ? DataType::S32 : input->data_type(); |
| 401 | TensorShape shape_v2mm_out = input->tensor_shape(); |
| 402 | shape_v2mm_out.set(0, conv_size * weights_z); |
| 403 | shape_v2mm_out.set(1, 1); |
| 404 | shape_v2mm_out.set(2, 1); |
| 405 | TensorInfo v2mm_output(input->clone()->set_is_resizable(true).reset_padding().set_data_type(v2mm_dt).set_tensor_shape(shape_v2mm_out)); |
| 406 | ARM_COMPUTE_RETURN_ON_ERROR(CLGEMMMatrixVectorMultiplyKernel::validate(&input_reshaped, &weights_reshaped, &v2mm_output)); |
| 407 | |
| 408 | TensorInfo output_reshaped(v2mm_output.clone()->set_is_resizable(true).reset_padding().set_tensor_shape(output_shape)); |
| 409 | ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseVectorToTensorKernel::validate(&v2mm_output, (is_quantized) ? &output_reshaped : output, conv_w, conv_h)); |
| 410 | |
| 411 | if(is_quantized) |
| 412 | { |
| 413 | ARM_COMPUTE_RETURN_ON_ERROR(CLDirectConvolutionLayerOutputStageKernel::validate(&output_reshaped, biases, output)); |
| 414 | } |
| 415 | |
| 416 | // Validate Activation Layer |
| 417 | if(act_info.enabled()) |
| 418 | { |
| 419 | ARM_COMPUTE_RETURN_ON_ERROR(CLActivationLayer::validate(output, nullptr, act_info)); |
| 420 | } |
| 421 | } |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 422 | else |
| 423 | { |
Usama Arif | e73686a | 2019-04-08 17:30:48 +0100 | [diff] [blame] | 424 | CLDepthwiseConvolutionLayer3x3::validate(input, weights, biases, output, conv_info, depth_multiplier, act_info, GPUTarget::MIDGARD, dilation); |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 425 | } |
Giorgio Arena | ad0c738 | 2018-04-23 16:16:21 +0100 | [diff] [blame] | 426 | return Status{}; |
| 427 | } |
| 428 | |
Giorgio Arena | 04a8f8c | 2017-11-23 11:45:24 +0000 | [diff] [blame] | 429 | void CLDepthwiseConvolutionLayer::run() |
Giorgio Arena | 93a690e | 2017-08-01 16:09:33 +0100 | [diff] [blame] | 430 | { |
Georgios Pinitas | 7221933 | 2018-06-05 14:56:06 +0100 | [diff] [blame] | 431 | prepare(); |
Georgios Pinitas | 1562be3 | 2018-03-08 19:09:19 +0000 | [diff] [blame] | 432 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 433 | if(_optimised_function != nullptr) |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 434 | { |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 435 | _optimised_function->run(); |
Georgios Pinitas | de5a1cc | 2018-02-02 12:52:07 +0000 | [diff] [blame] | 436 | } |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 437 | else |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 438 | { |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 439 | CLScheduler::get().enqueue(_im2col_kernel); |
| 440 | CLScheduler::get().enqueue(_v2mm_input_fill_border); |
| 441 | CLScheduler::get().enqueue(_v2mm_kernel); |
| 442 | CLScheduler::get().enqueue(_vector_to_tensor_kernel); |
| 443 | if(_is_quantized) |
| 444 | { |
| 445 | CLScheduler::get().enqueue(_output_stage_kernel); |
| 446 | } |
| 447 | if(_is_activationlayer_enabled) |
| 448 | { |
| 449 | _activationlayer_function.run(); |
| 450 | } |
Georgios Pinitas | 60e9825 | 2018-10-22 16:17:20 +0100 | [diff] [blame] | 451 | } |
Giorgio Arena | 9fe4144 | 2017-08-23 16:36:24 +0100 | [diff] [blame] | 452 | } |
Georgios Pinitas | 7221933 | 2018-06-05 14:56:06 +0100 | [diff] [blame] | 453 | |
| 454 | void CLDepthwiseConvolutionLayer::prepare() |
| 455 | { |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 456 | if(_optimised_function != nullptr) |
Georgios Pinitas | 7221933 | 2018-06-05 14:56:06 +0100 | [diff] [blame] | 457 | { |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 458 | _optimised_function->prepare(); |
| 459 | } |
| 460 | else |
| 461 | { |
| 462 | if(!_is_prepared) |
| 463 | { |
| 464 | ARM_COMPUTE_ERROR_ON(!_original_weights->is_used()); |
Georgios Pinitas | 7221933 | 2018-06-05 14:56:06 +0100 | [diff] [blame] | 465 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 466 | // Run weights reshaping and mark original weights tensor as unused |
| 467 | _weights_reshaped.allocator()->allocate(); |
| 468 | CLScheduler::get().enqueue(_weights_reshape_kernel); |
| 469 | CLScheduler::get().enqueue(_v2mm_weights_fill_border); |
| 470 | _original_weights->mark_as_unused(); |
Georgios Pinitas | 7221933 | 2018-06-05 14:56:06 +0100 | [diff] [blame] | 471 | |
Pablo Tello | 8bf622a | 2018-12-03 15:54:49 +0000 | [diff] [blame] | 472 | CLScheduler::get().queue().finish(); |
| 473 | _is_prepared = true; |
| 474 | } |
Georgios Pinitas | 7221933 | 2018-06-05 14:56:06 +0100 | [diff] [blame] | 475 | } |
| 476 | } |
giuros01 | 6d10996 | 2019-01-07 17:47:19 +0000 | [diff] [blame] | 477 | } // namespace arm_compute |