Compute Library
 22.05
ClWinogradOutputTransformKernel.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2022 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  */
25 
32 #include "arm_compute/core/Types.h"
33 #include "arm_compute/core/Utils.h"
38 #include "src/core/CL/CLValidate.h"
41 #include "support/Cast.h"
42 #include "support/StringSupport.h"
43 
44 #include <cmath>
45 
47 
48 namespace arm_compute
49 {
50 namespace opencl
51 {
52 namespace kernels
53 {
54 namespace
55 {
56 Status validate_arguments(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const WinogradInfo &winograd_info, const ActivationLayerInfo &act_info)
57 {
58  ARM_COMPUTE_UNUSED(act_info);
61 
62  ARM_COMPUTE_RETURN_ERROR_ON(output->data_layout() != winograd_info.output_data_layout);
63 
64  const PadStrideInfo conv_info = winograd_info.convolution_info;
65  const Size2D output_tile_size = winograd_info.output_tile_size;
66  const Size2D kernel_size = winograd_info.kernel_size;
67  const Size2D input_dimensions = winograd_info.input_dimensions;
68  const unsigned int num_channels = (winograd_info.kernel_size.width + winograd_info.output_tile_size.width - 1) * (winograd_info.kernel_size.height + winograd_info.output_tile_size.height - 1);
69 
70  ARM_COMPUTE_RETURN_ERROR_ON_MSG(!cl_winograd_convolution_layer_supported(output_tile_size, kernel_size, winograd_info.output_data_layout), "Winograd output transform not supported");
71  ARM_COMPUTE_RETURN_ERROR_ON_MSG(input->dimension(2) != num_channels, "Wrong number of channels");
72 
73  // Compute number of elements to process in the X and Y direction
74  // Compute the number of output tiles along the x and y direction of size "output_tile_size"
75  const Size2D num_tiles = compute_winograd_convolution_tiles(input_dimensions,
76  kernel_size,
77  output_tile_size,
78  conv_info);
79 
80  ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(1) != static_cast<unsigned int>((num_tiles.area())));
81 
82  if(bias != nullptr)
83  {
85  ARM_COMPUTE_RETURN_ERROR_ON(input->dimension(0) != bias->dimension(0));
86  }
87 
88  // Checks performed when output is configured
89  if(output->total_size() != 0)
90  {
91  const TensorInfo tensor_info_output = input->clone()->set_tensor_shape(compute_winograd_output_transform_shape(*input, winograd_info));
92 
93  ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(output, &tensor_info_output);
95  }
96 
97  return Status{};
98 }
99 
100 std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITensorInfo *bias, ITensorInfo *output, const Size2D &output_tile_size)
101 {
102  ARM_COMPUTE_ERROR_ON_NULLPTR(input, output);
103  ARM_COMPUTE_UNUSED(bias);
104 
105  constexpr unsigned int num_elems_processed_per_iteration = 1;
106 
107  Window win = calculate_max_window(*input, Steps(num_elems_processed_per_iteration));
108  bool window_changed = false;
109 
110  if(output->data_layout() == DataLayout::NCHW)
111  {
112  const int output_static_window_end_x = ceil_to_multiple(output->dimension(0), output_tile_size.width);
113  const int output_static_window_end_y = ceil_to_multiple(output->dimension(1), output_tile_size.height);
114 
115  AccessWindowRectangle input_access(input, 0, 0, num_elems_processed_per_iteration, num_elems_processed_per_iteration);
116  AccessWindowStatic output_access(output, 0, 0, output_static_window_end_x, output_static_window_end_y);
117  window_changed = update_window_and_padding(win, input_access, output_access);
118  }
119 
120  Status err = (window_changed) ? ARM_COMPUTE_CREATE_ERROR(ErrorCode::RUNTIME_ERROR, "Insufficient Padding!") : Status{};
121  return std::make_pair(err, win);
122 }
123 } // namespace
124 
126 {
127  _type = CLKernelType::WINOGRAD;
128 }
129 
131  const ActivationLayerInfo &act_info)
132 {
134 
135  // Output tensor auto initialization if not yet initialized
136  auto_init_if_empty(*dst, src->clone()->set_tensor_shape(compute_winograd_output_transform_shape(*src, winograd_info)));
137 
138  ARM_COMPUTE_ERROR_THROW_ON(validate_arguments(src, bias, dst, winograd_info, act_info));
139 
140  // Configure kernel window
141  auto win_config = validate_and_configure_window(src, bias, dst, winograd_info.output_tile_size);
142  ARM_COMPUTE_ERROR_THROW_ON(win_config.first);
143  IClKernel::configure_internal(win_config.second);
144 
145  auto padding_info = get_padding_info({ src, bias, dst });
146 
147  _is_nhwc = winograd_info.output_data_layout == DataLayout::NHWC;
148 
149  // Compute num_tiles_x
150  const Size2D input_dimensions = winograd_info.input_dimensions;
151  const Size2D kernel_size = winograd_info.kernel_size;
152  const Size2D output_tile_size = winograd_info.output_tile_size;
153  const PadStrideInfo conv_info = winograd_info.convolution_info;
156 
157  // Compute the number of output tiles along the x and y direction of size "output_tile_size"
158  const Size2D num_tiles = compute_winograd_convolution_tiles(input_dimensions,
159  kernel_size,
160  output_tile_size,
161  conv_info);
162  const size_t total_batches = dst->tensor_shape().total_size_upper(3);
163 
164  // Set build options
165  CLBuildOptions build_opts;
166  build_opts.add_option("-DACTIVATION_TYPE=" + lower_string(string_from_activation_func(act_info.activation())));
167  build_opts.add_option_if(act_info.enabled(), "-DA_VAL=" + float_to_string_with_full_precision(act_info.a()));
168  build_opts.add_option_if(act_info.enabled(), "-DB_VAL=" + float_to_string_with_full_precision(act_info.b()));
169 
170  if((output_tile_size.x() == 2) || (output_tile_size.x() == 1 && output_tile_size.y() == 2))
171  {
172  build_opts.add_option("-DVEC_SIZE=2");
173  }
174  else if((output_tile_size.x() == 4) || (output_tile_size.x() == 1 && output_tile_size.y() == 4))
175  {
176  build_opts.add_option("-DVEC_SIZE=4");
177  }
178 
179  if(_is_nhwc)
180  {
181  build_opts.add_option_if(bias != nullptr, std::string("-DHAS_BIAS"));
182  build_opts.add_option("-cl-fast-relaxed-math");
183  build_opts.add_option("-DN0=" + support::cpp11::to_string(win_config.second.x().step()));
184  build_opts.add_option("-DOUTPUT_TILE_W=" + support::cpp11::to_string(output_tile_size.width));
185  build_opts.add_option("-DOUTPUT_TILE_H=" + support::cpp11::to_string(output_tile_size.height));
186  build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(src->data_type()));
187  build_opts.add_option_if(total_batches > 1, "-DSRC_DEPTH=" + support::cpp11::to_string(src->dimension(2)));
188  build_opts.add_option_if(winograd_info.kernel_size.height == 1, "-DWINOGRAD_OUTPUT_TRANSFORM_HORIZONTAL");
189  build_opts.add_option_if(winograd_info.kernel_size.width == 1, "-DWINOGRAD_OUTPUT_TRANSFORM_VERTICAL");
190  }
191  else
192  {
193  build_opts.add_option_if(bias != nullptr, std::string("-DHAS_BIAS"));
194  build_opts.add_option("-cl-fast-relaxed-math");
195  build_opts.add_option("-DN0=" + support::cpp11::to_string(win_config.second.x().step()));
196  build_opts.add_option("-DNUM_TILES_X=" + support::cpp11::to_string(num_tiles.width));
197  build_opts.add_option("-DOUTPUT_TILE_W=" + support::cpp11::to_string(output_tile_size.width));
198  build_opts.add_option("-DOUTPUT_TILE_H=" + support::cpp11::to_string(output_tile_size.height));
199  build_opts.add_option("-DDATA_TYPE=" + get_cl_type_from_data_type(src->data_type()));
200  build_opts.add_option("-DSRC_HEIGHT=" + support::cpp11::to_string(src->dimension(1)));
201  build_opts.add_option("-DDST_WIDTH=" + support::cpp11::to_string(dst->dimension(idx_width)));
202  build_opts.add_option("-DDST_HEIGHT=" + support::cpp11::to_string(dst->dimension(idx_height)));
203  build_opts.add_option_if(total_batches > 1, "-DSRC_DEPTH=" + support::cpp11::to_string(src->dimension(2)));
204  build_opts.add_option_if(winograd_info.kernel_size.height == 1, "-DWINOGRAD_OUTPUT_TRANSFORM_HORIZONTAL");
205  build_opts.add_option_if(winograd_info.kernel_size.width == 1, "-DWINOGRAD_OUTPUT_TRANSFORM_VERTICAL");
206  }
207 
208  // Storing tensor dimensions to be sent later as kernel arguments
209  _src_height = src->dimension(1);
210  _dst_width = dst->dimension(idx_width);
211  _dst_height = dst->dimension(idx_height);
212  _num_tiles_x = num_tiles.width;
213 
214  // Create kernel
215  std::string kernel_name = "winograd_output_transform_" + output_tile_size.to_string() + "_" + kernel_size.to_string() + "_" + lower_string(string_from_data_layout(winograd_info.output_data_layout));
216 
217  // A macro guard to compile ONLY the kernel of interest
218  build_opts.add_option("-D" + upper_string(kernel_name));
219  _kernel = create_kernel(compile_context, kernel_name, build_opts.options());
220 
221  // Set config_id for enabling LWS tuning
222  _config_id = kernel_name;
223  _config_id += "_";
224  _config_id += lower_string(string_from_data_type(src->data_type()));
225  _config_id += "_";
226  _config_id += support::cpp11::to_string(src->dimension(0));
227  _config_id += "_";
228  _config_id += support::cpp11::to_string(src->dimension(1));
229  _config_id += "_";
230  _config_id += support::cpp11::to_string(dst->dimension(0));
231  _config_id += "_";
232  _config_id += support::cpp11::to_string(dst->dimension(1));
233  _config_id += "_";
234  _config_id += lower_string(string_from_data_layout(winograd_info.output_data_layout));
235 
236  ARM_COMPUTE_ERROR_ON(has_padding_changed(padding_info) && _is_nhwc);
237 }
238 
240 {
241  ARM_COMPUTE_RETURN_ON_ERROR(validate_arguments(src, (bias != nullptr ? bias->clone().get() : nullptr), dst, winograd_info, act_info));
242  ARM_COMPUTE_RETURN_ON_ERROR(validate_and_configure_window(src->clone().get(), (bias != nullptr ? bias->clone().get() : nullptr), dst->clone().get(), winograd_info.output_tile_size).first);
243  return Status{};
244 }
245 
246 void ClWinogradOutputTransformKernel::run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue)
247 {
249  ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IClKernel::window(), window);
250 
251  auto src = utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_0));
252  auto bias = utils::cast::polymorphic_downcast<const ICLTensor *>(tensors.get_const_tensor(TensorType::ACL_SRC_1));
253  auto dst = utils::cast::polymorphic_downcast<ICLTensor *>(tensors.get_tensor(TensorType::ACL_DST));
254 
255  // Collapse window
256  Window window_collapsed = window.collapse_if_possible(IClKernel::window(), Window::DimZ);
257 
258  // Get initial windows
259  Window slice = window_collapsed.first_slice_window_4D();
260  slice.set(Window::DimZ, Window::Dimension(0, 1, 1));
261 
262  // Setup output slice
263  Window slice_out(slice);
264  slice_out.set(Window::DimX, Window::Dimension(0, 0, 0));
265  slice_out.set(Window::DimY, Window::Dimension(0, 0, 0));
266 
267  if(bias != nullptr)
268  {
269  unsigned int idx1 = 2 * num_arguments_per_4D_tensor();
270  Window slice_biases;
271  slice_biases.use_tensor_dimensions(bias->info()->tensor_shape());
272  add_1D_tensor_argument(idx1, bias, slice_biases);
273  }
274 
275  if(_is_nhwc)
276  {
277  unsigned int idx2 = 2 * num_arguments_per_4D_tensor() + ((bias != nullptr) ? num_arguments_per_1D_tensor() : 0);
278  _kernel.setArg(idx2++, static_cast<int>(dst->info()->total_size() - dst->info()->strides_in_bytes().y()));
279  _kernel.setArg<cl_int>(idx2++, _src_height);
280  _kernel.setArg<cl_int>(idx2++, _dst_width);
281  _kernel.setArg<cl_int>(idx2++, _dst_height);
282  _kernel.setArg<cl_int>(idx2++, _num_tiles_x);
283  }
284 
285  do
286  {
287  unsigned int idx = 0;
288  add_4D_tensor_argument(idx, src, slice);
289  add_4D_tensor_argument(idx, dst, slice_out);
290  enqueue(queue, *this, slice, lws_hint());
291  }
292  while(window.slide_window_slice_3D(slice) && window.slide_window_slice_3D(slice_out));
293 }
294 } // namespace kernels
295 } // namespace opencl
296 } // namespace arm_compute
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
#define ARM_COMPUTE_RETURN_ERROR_ON_F16_UNSUPPORTED(tensor)
Definition: CLValidate.h:35
DataLayout output_data_layout
Data layout to use for the output tensor once the convolution has been applied (NCHW or NHWC) ...
Definition: Types.h:2347
void run_op(ITensorPack &tensors, const Window &window, cl::CommandQueue &queue) override
Enqueue the OpenCL kernel to process the given window on the passed OpenCL command queue...
bool enabled() const
Check if initialised.
Definition: Types.h:1675
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
void enqueue(cl::CommandQueue &queue, ICLKernel &kernel, const Window &window, const cl::NDRange &lws_hint=CLKernelLibrary::get().default_ndrange(), bool use_dummy_work_items=false)
Add the kernel to the command queue with the given window.
Definition: ICLKernel.cpp:32
const StringSet & options() const
Gets the current options list set.
Winograd information.
Definition: Types.h:2328
float a() const
Get the alpha value.
Definition: Types.h:1665
PadStrideInfo convolution_info
Convolution info (Pads, strides,...)
Definition: Types.h:2346
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Definition: Error.h:204
std::string to_string(T &&value)
Convert integer and float values to string.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
1 channel, 1 F32 per channel
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:466
const std::string & string_from_activation_func(ActivationLayerInfo::ActivationFunction act)
Translates a given activation function to a string.
Definition: Utils.cpp:163
size_t total_size_upper(size_t dimension) const
Collapses given dimension and above.
Definition: TensorShape.h:182
Store the tensor&#39;s metadata.
Definition: ITensorInfo.h:40
#define ARM_COMPUTE_ERROR_THROW_ON(status)
Definition: Error.h:455
Describe one of the image&#39;s dimensions with a start, end and step.
Definition: Window.h:79
Size2D compute_winograd_convolution_tiles(const Size2D &in_dims, const Size2D &kernel_size, const Size2D &output_tile_size, const PadStrideInfo &conv_info)
Calculate the number of output tiles required by Winograd Convolution layer.
Definition: Helpers.h:227
Manages all the OpenCL kernels compilation and caching, provides accessors for the OpenCL Context...
size_t x() const
Semantic accessor for width as x.
Definition: Size2D.h:75
Status class.
Definition: Error.h:52
std::string lower_string(const std::string &val)
Lower a given string.
Definition: Utils.cpp:351
void configure(const ClCompileContext &compile_context, ITensorInfo *src, ITensorInfo *bias, ITensorInfo *dst, const WinogradInfo &winograd_info, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Set the input and output tensor.
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Definition: Error.h:296
Activation Layer Information class.
Definition: Types.h:1625
void use_tensor_dimensions(const TensorShape &shape, size_t first_dimension=Window::DimX)
Use the tensor&#39;s dimensions to fill the window dimensions.
Definition: Window.inl:276
SimpleTensor< float > src
Definition: DFT.cpp:155
Copyright (c) 2017-2022 Arm Limited.
size_t height
Height of the image region or rectangle.
Definition: Size2D.h:91
1 channel, 1 F16 per channel
void add_option(std::string option)
Adds option to the existing build option list.
const ITensor * get_const_tensor(int id) const
Get constant tensor of a given id.
Definition: ITensorPack.cpp:54
std::string upper_string(const std::string &val)
Raise a given string to upper case.
Definition: Utils.cpp:358
cl::Kernel create_kernel(const CLCompileContext &ctx, const std::string &kernel_name, const std::set< std::string > &build_opts=std::set< std::string >())
Creates an opencl kernel using a compile context.
Definition: CLHelpers.cpp:391
const std::string & string_from_data_type(DataType dt)
Convert a data type identity into a string.
Definition: Utils.cpp:135
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
Definition: Window.h:43
bool update_window_and_padding(Window &win, Ts &&... patterns)
Update window and padding size for each of the access patterns.
Definition: WindowHelpers.h:46
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:152
Window collapse_if_possible(const Window &full_window, size_t first, size_t last, bool *has_collapsed=nullptr) const
Collapse the dimensions between first and last if possible.
Definition: Window.inl:68
std::string float_to_string_with_full_precision(float val)
Create a string with the float in full precision.
Definition: Utils.h:1124
virtual const TensorShape & tensor_shape() const =0
Size for each dimension of the tensor.
Size2D output_tile_size
Width and height of the output tile.
Definition: Types.h:2343
auto ceil_to_multiple(S value, T divisor) -> decltype(((value+divisor - 1)/divisor) *divisor)
Computes the smallest number larger or equal to value that is a multiple of divisor.
Definition: Utils.h:71
unsigned int num_elems_processed_per_iteration
std::string get_cl_type_from_data_type(const DataType &dt)
Translates a tensor data type to the appropriate OpenCL type.
Definition: CLHelpers.cpp:39
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
void add_option_if(bool cond, std::string option)
Adds option if a given condition is true;.
Padding and stride information class.
Definition: Types.h:669
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
Definition: Window.inl:49
bool slide_window_slice_3D(Window &slice) const
Slide the passed 3D window slice.
Definition: Window.h:348
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
Definition: Validate.h:915
bool has_padding_changed(const std::unordered_map< const ITensorInfo *, PaddingSize > &padding_map)
Check if the previously stored padding info has changed after configuring a kernel.
Definition: Utils.cpp:601
Num samples, channels, height, width.
CLCompileContext class.
size_t y() const
Semantic accessor for height as y.
Definition: Size2D.h:84
Convolution using Winograd.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
Definition: Window.h:45
std::pair< Status, Window > validate_and_configure_window(ITensorInfo *src, ITensorInfo *dst)
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
Definition: ITensorPack.cpp:64
const std::string & string_from_data_layout(DataLayout dl)
Convert a data layout identity into a string.
Definition: Utils.cpp:123
TensorShape compute_winograd_output_transform_shape(const ITensorInfo &input, const WinogradInfo &winograd_info)
Calculate the winograd output transform shape.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(...)
Definition: Validate.h:439
#define ARM_COMPUTE_CREATE_ERROR(error_code, msg)
Creates an error with a given message.
Definition: Error.h:159
size_t width
Width of the image region or rectangle.
Definition: Size2D.h:90
static constexpr size_t DimZ
Alias for dimension 2 also known as Z dimension.
Definition: Window.h:47
size_t get_data_layout_dimension_index(const DataLayout &data_layout, const DataLayoutDimension &data_layout_dimension)
Get the index of the given dimension.
Definition: Helpers.inl:193
Class for specifying the size of an image or rectangle.
Definition: Size2D.h:34
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
Definition: Validate.h:541
Num samples, height, width, channels.
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
Definition: Validate.h:788
std::unordered_map< const ITensorInfo *, PaddingSize > get_padding_info(std::initializer_list< const ITensorInfo *> infos)
Stores padding information before configuring a kernel.
Definition: Utils.cpp:586
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
Definition: Error.h:244
Size2D kernel_size
Width and height of the kernel.
Definition: Types.h:2344
Tensor packing service.
Definition: ITensorPack.h:39
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
Definition: Validate.h:157
ActivationFunction activation() const
Get the type of activation function.
Definition: Types.h:1660
float b() const
Get the beta value.
Definition: Types.h:1670
bool cl_winograd_convolution_layer_supported(const Size2D &output_tile, const Size2D &kernel_size, DataLayout data_layout)
This function checks if the Winograd configuration (defined through the output tile, kernel size and the data layout) is supported on OpenCL.
Definition: CLHelpers.cpp:286
std::string kernel_name
Size2D input_dimensions
Width and height of the input tensor before the convolution is applied.
Definition: Types.h:2345
static Status validate(const ITensorInfo *src, const ITensorInfo *bias, const ITensorInfo *dst, const WinogradInfo &winograd_info, const ActivationLayerInfo &act_info=ActivationLayerInfo())
Static function to check if given info will lead to a valid configuration.
Describe a multidimensional execution window.
Definition: Window.h:39
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
Definition: Validate.h:201
SimpleTensor< T > slice(const SimpleTensor< T > &src, Coordinates starts, Coordinates ends)
std::string to_string() const
Definition: Size2D.cpp:29
const int32_t * bias