Compute Library
 19.08
CLDepthwiseConvolutionLayer3x3 Class Reference

Basic function to execute a depthwise convolution for kernel size 3x3xC (when data layout NCHW) or Cx3x3 (when data layout NHWC). More...

#include <CLDepthwiseConvolutionLayer.h>

Collaboration diagram for CLDepthwiseConvolutionLayer3x3:
[legend]

Public Member Functions

 CLDepthwiseConvolutionLayer3x3 (std::shared_ptr< IMemoryManager > memory_manager=nullptr)
 Default constructor. More...
 
 CLDepthwiseConvolutionLayer3x3 (const CLDepthwiseConvolutionLayer3x3 &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 CLDepthwiseConvolutionLayer3x3 (CLDepthwiseConvolutionLayer3x3 &&)=default
 Default move constructor. More...
 
CLDepthwiseConvolutionLayer3x3operator= (const CLDepthwiseConvolutionLayer3x3 &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
CLDepthwiseConvolutionLayer3x3operator= (CLDepthwiseConvolutionLayer3x3 &&)=default
 Default move assignment operator. More...
 
void configure (ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U))
 Initialize the function's source, destination, conv and border_size. More...
 
void run () override
 Run the kernels contained in the function. More...
 
void prepare () override
 Prepare the function for executing. More...
 
- Public Member Functions inherited from IFunction
virtual ~IFunction ()=default
 Destructor. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), GPUTarget gpu_target=GPUTarget::MIDGARD, const Size2D &dilation=Size2D(1U, 1U))
 Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLayer3x3. More...
 

Detailed Description

Basic function to execute a depthwise convolution for kernel size 3x3xC (when data layout NCHW) or Cx3x3 (when data layout NHWC).

This function calls the following OpenCL kernels:

  1. CLDepthwiseConvolutionLayer3x3NCHWKernel (if data_layout == NCHW)
  2. CLDepthwiseConvolutionLayer3x3NHWCKernel (if data_layout == NHWC)
  3. CLDepthwiseConvolutionLayerReshapeWeightsKernel (if data_layout == NHWC)
  4. CLFillBorderKernel (if pad_x or pad_y > 0)

Definition at line 56 of file CLDepthwiseConvolutionLayer.h.

Constructor & Destructor Documentation

◆ CLDepthwiseConvolutionLayer3x3() [1/3]

CLDepthwiseConvolutionLayer3x3 ( std::shared_ptr< IMemoryManager memory_manager = nullptr)

Default constructor.

Definition at line 41 of file CLDepthwiseConvolutionLayer.cpp.

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)
44 {
45 }

◆ CLDepthwiseConvolutionLayer3x3() [2/3]

Prevent instances of this class from being copied (As this class contains pointers)

◆ CLDepthwiseConvolutionLayer3x3() [3/3]

Default move constructor.

Member Function Documentation

◆ configure()

void configure ( ICLTensor input,
const ICLTensor weights,
const ICLTensor biases,
ICLTensor output,
const PadStrideInfo conv_info,
unsigned int  depth_multiplier = 1,
ActivationLayerInfo  act_info = ActivationLayerInfo(),
const Size2D dilation = Size2D(1U, 1U) 
)

Initialize the function's source, destination, conv and border_size.

Parameters
[in,out]inputSource tensor. Data type supported: QASYMM8/F16/F32. (Written to only for border filling).
[in]weightsWeights tensor. A 3D tensor with shape [3, 3, IFM]. Data type supported: Same as input.
[in]biasesBiases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as input.
[out]outputDestination tensor. Data type supported: same as input.
[in]conv_infoPadding and stride information to use for the convolution.
[in]depth_multiplier(Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1.
[in]act_info(Optional) Activation layer information in case of a fused activation. Only RELU, BOUNDED_RELU and LU_BOUNDED_RELU for 3x3 QASYMM8 supported.
[in]dilation(Optional) Dilation, in elements, across x and y. Defaults to (1, 1).

Definition at line 47 of file CLDepthwiseConvolutionLayer.cpp.

49 {
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());
60 
61  const bool is_nhwc = input->info()->data_layout() == DataLayout::NHWC;
62 
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());
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 
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 
77  DepthwiseConvolutionReshapeInfo info;
78  info.c0 = 4;
79  info.transpose = is_stride_1_dilation_1 && is_dot8_supported;
80 
81  if(_needs_permute)
82  {
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  _permuted_output.info()->set_quantization_info(output->info()->quantization_info());
94 
95  input_to_use = &_permuted_input;
96  weights_to_use = &_permuted_weights;
97  output_to_use = &_permuted_output;
98 
99  _kernel = arm_compute::support::cpp14::make_unique<CLDepthwiseConvolutionLayer3x3NCHWKernel>();
100  }
101  else if(is_nhwc)
102  {
103  if(_needs_weights_reshape)
104  {
105  _reshape_weights.configure(weights, &_permuted_weights, info);
106  weights_to_use = &_permuted_weights;
107  }
108  _kernel = arm_compute::support::cpp14::make_unique<CLDepthwiseConvolutionLayer3x3NHWCKernel>();
109  }
110  else
111  {
112  _kernel = arm_compute::support::cpp14::make_unique<CLDepthwiseConvolutionLayer3x3NCHWKernel>();
113  }
114 
115  // Configure kernel
116  _kernel->set_target(CLScheduler::get().target());
117  _kernel->configure(input_to_use, weights_to_use, biases, output_to_use, conv_info, depth_multiplier, act_info, dilation);
118 
119  // Permute output if needed
120  if(_needs_permute)
121  {
122  // Configure the function to transform the convoluted output to ACL's native ordering format NCHW
123  _permuted_output.info()->set_data_layout(DataLayout::NCHW);
124  _permute_output_to_nhwc.configure(&_permuted_output, output, PermutationVector(2U, 0U, 1U));
125 
126  // Allocate tensors
127  _permuted_input.allocator()->allocate();
128  _permuted_output.allocator()->allocate();
129  }
130  // Configure border handler
131  PixelValue &&zero_value(0.f);
132  if(is_data_type_quantized_asymmetric(input->info()->data_type()))
133  {
134  zero_value = PixelValue(static_cast<uint8_t>(input->info()->quantization_info().uniform().offset));
135  }
136  _border_handler.configure(input_to_use, _kernel->border_size(), BorderMode::CONSTANT, zero_value);
137 }
bool dot8_supported(const cl::Device &device)
Helper function to check whether the cl_arm_integer_dot_product_int8 extension is supported.
Definition: CLHelpers.cpp:149
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
Definition: CLTensor.cpp:35
#define ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(...)
Definition: Validate.h:543
static CLScheduler & get()
Access the scheduler singleton.
Definition: CLScheduler.cpp:41
size_t dimension(size_t index) const override
Return the size of the requested dimension.
Definition: TensorInfo.h:223
1 channel, 1 F32 per channel
Strides PermutationVector
Permutation vector.
Definition: Types.h:47
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:337
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
CLTensorAllocator * allocator()
Return a pointer to the tensor's allocator.
Definition: CLTensor.cpp:55
void configure(ICLTensor *tensor, BorderSize border_size, BorderMode border_mode, const PixelValue &constant_border_value=PixelValue())
Initialise the kernel's input, output and border mode.
1 channel, 1 F16 per channel
ITensorInfo & set_quantization_info(const QuantizationInfo &quantization_info) override
Set the quantization settings (scale and offset) of the tensor.
Definition: TensorInfo.cpp:364
ITensorInfo & set_data_layout(const DataLayout &data_layout) override
Set the data layout of the tensor.
Definition: TensorInfo.cpp:370
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:160
void manage(TensorType *obj)
Sets a object to be managed by the given memory group.
quantized, asymmetric fixed-point 8-bit number
Num samples, channels, height, width.
#define ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
Definition: Validate.h:789
void configure(const ICLTensor *input, ICLTensor *output, const DepthwiseConvolutionReshapeInfo &info)
Initialize the function's source and destination.
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
Definition: Utils.h:1030
void allocate() override
Allocate size specified by TensorInfo of OpenCL memory.
Num samples, height, width, channels.
void configure(const ICLTensor *input, ICLTensor *output, const PermutationVector &perm)
Set the input and output tensors.
Definition: CLPermute.cpp:33
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:326

References arm_compute::test::validation::act_info, CLTensorAllocator::allocate(), CLTensor::allocator(), ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_UNUSED, CLPermute::configure(), CLDepthwiseConvolutionLayerReshapeWeightsKernel::configure(), CLFillBorderKernel::configure(), arm_compute::CONSTANT, arm_compute::test::validation::conv_info, ITensorInfo::data_layout(), ITensorInfo::data_type(), arm_compute::test::validation::dilation, ITensorInfo::dimension(), TensorInfo::dimension(), arm_compute::dot8_supported(), arm_compute::F16, arm_compute::F32, CLScheduler::get(), CLKernelLibrary::get(), arm_compute::get_data_layout_dimension_index(), arm_compute::HEIGHT, ITensor::info(), CLTensor::info(), arm_compute::test::validation::info, arm_compute::is_data_type_quantized_asymmetric(), MemoryGroupBase< TensorType >::manage(), arm_compute::NCHW, arm_compute::NHWC, UniformQuantizationInfo::offset, arm_compute::QASYMM8, ITensorInfo::quantization_info(), TensorInfo::set_data_layout(), TensorInfo::set_quantization_info(), arm_compute::U, QuantizationInfo::uniform(), arm_compute::test::validation::weights, and arm_compute::WIDTH.

◆ operator=() [1/2]

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

Default move assignment operator.

◆ prepare()

void prepare ( )
overridevirtual

Prepare the function for executing.

Any one off pre-processing step required by the function is handled here

Note
Prepare stage might not need all the function's buffers' backing memory to be available in order to execute

Reimplemented from IFunction.

Definition at line 224 of file CLDepthwiseConvolutionLayer.cpp.

225 {
226  if(!_is_prepared)
227  {
228  if(_needs_permute)
229  {
230  ARM_COMPUTE_ERROR_ON(!_original_weights->is_used());
231 
232  _permuted_weights.allocator()->allocate();
233  _permute_weights_to_nchw.run();
234  _original_weights->mark_as_unused();
235  }
236 
237  if(_needs_weights_reshape)
238  {
239  ARM_COMPUTE_ERROR_ON(_needs_permute);
240  ARM_COMPUTE_ERROR_ON(!_original_weights->is_used());
241  _permuted_weights.allocator()->allocate();
242  CLScheduler::get().enqueue(_reshape_weights);
243  _original_weights->mark_as_unused();
244  }
245  _is_prepared = true;
246  }
247 }
static CLScheduler & get()
Access the scheduler singleton.
Definition: CLScheduler.cpp:41
bool is_used() const
Flags if the tensor is used or not.
Definition: ITensor.cpp:162
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Definition: Error.h:337
CLTensorAllocator * allocator()
Return a pointer to the tensor's allocator.
Definition: CLTensor.cpp:55
void mark_as_unused() const
Marks a tensor as unused.
Definition: ITensor.cpp:167
void run() override final
Run the kernels contained in the function.
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
Definition: CLScheduler.cpp:95
void allocate() override
Allocate size specified by TensorInfo of OpenCL memory.

References CLTensorAllocator::allocate(), CLTensor::allocator(), ARM_COMPUTE_ERROR_ON, CLScheduler::enqueue(), CLScheduler::get(), ITensor::is_used(), ITensor::mark_as_unused(), and ICLSimpleFunction::run().

Referenced by CLDepthwiseConvolutionLayer3x3::run().

◆ run()

void run ( )
overridevirtual

Run the kernels contained in the function.

For NEON kernels:

  • Multi-threading is used for the kernels which are parallelisable.
  • By default std::thread::hardware_concurrency() threads are used.
Note
CPPScheduler::set_num_threads() can be used to manually set the number of threads

For OpenCL kernels:

  • All the kernels are enqueued on the queue associated with CLScheduler.
  • The queue is then flushed.
Note
The function will not block until the kernels are executed. It is the user's responsibility to wait.
Will call prepare() on first run if hasn't been done

Implements IFunction.

Definition at line 205 of file CLDepthwiseConvolutionLayer.cpp.

206 {
207  prepare();
208 
209  MemoryGroupResourceScope scope_mg(_memory_group);
210 
211  if(_needs_permute)
212  {
213  _permute_input_to_nchw.run();
214  }
215  CLScheduler::get().enqueue(_border_handler);
216  CLScheduler::get().enqueue(*_kernel);
217 
218  if(_needs_permute)
219  {
220  _permute_output_to_nhwc.run();
221  }
222 }
void prepare() override
Prepare the function for executing.
static CLScheduler & get()
Access the scheduler singleton.
Definition: CLScheduler.cpp:41
void run() override final
Run the kernels contained in the function.
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
Definition: CLScheduler.cpp:95

References CLScheduler::enqueue(), CLScheduler::get(), CLDepthwiseConvolutionLayer3x3::prepare(), and ICLSimpleFunction::run().

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo weights,
const ITensorInfo biases,
const ITensorInfo output,
const PadStrideInfo conv_info,
unsigned int  depth_multiplier = 1,
ActivationLayerInfo  act_info = ActivationLayerInfo(),
GPUTarget  gpu_target = GPUTarget::MIDGARD,
const Size2D dilation = Size2D(1U, 1U) 
)
static

Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLayer3x3.

Parameters
[in]inputSource tensor info. Data type supported: QASYMM8 for all layouts, F16/F32 for NCHW.
[in]weightsWeights tensor info. A 3D tensor with shape [3, 3, IFM]. Data type supported: Same as input.
[in]biasesBiases tensor info. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as input, S32 when input is QASYMM8.
[in]outputDestination tensor. Data type supported: same as input.
[in]conv_infoPadding and stride information to use for the convolution.
[in]depth_multiplier(Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1.
[in]act_info(Optional) Activation layer information in case of a fused activation. Only RELU, BOUNDED_RELU and LU_BOUNDED_RELU for 3x3 QASYMM8 supported.
[in]gpu_target(Optional) GPU target to validate the kernel for. Defaults to midgard.
[in]dilation(Optional) Dilation, in elements, across x and y. Defaults to (1, 1).
Returns
a status

Definition at line 139 of file CLDepthwiseConvolutionLayer.cpp.

141 {
143  ARM_COMPUTE_RETURN_ERROR_ON(input->data_layout() == DataLayout::UNKNOWN);
144 
145  const bool is_quantized = is_data_type_quantized_asymmetric(input->data_type());
146  const bool is_nhwc = input->data_layout() == DataLayout::NHWC;
147  const bool needs_permute = is_nhwc && (depth_multiplier > 1);
148  const bool needs_weights_reshape = is_nhwc && (depth_multiplier == 1) && is_quantized;
149  const bool is_stride_1 = ((conv_info.stride().first == conv_info.stride().second) && (conv_info.stride().first == 1));
150  const bool is_stride_1_dilation_1 = (is_stride_1 && dilation.x() == 1 && dilation.y() == 1);
151  const bool is_dot8_supported = dot8_supported(CLKernelLibrary::get().get_device());
152  DepthwiseConvolutionReshapeInfo info;
153  info.c0 = 4;
154  info.transpose = is_stride_1_dilation_1 && is_dot8_supported;
155 
156  if(is_quantized)
157  {
158  const UniformQuantizationInfo iq_info = input->quantization_info().uniform();
159  const UniformQuantizationInfo wq_info = weights->quantization_info().uniform();
160  const UniformQuantizationInfo oq_info = (output->total_size() == 0) ? iq_info : output->quantization_info().uniform();
161 
162  const float multiplier = iq_info.scale * wq_info.scale / oq_info.scale;
163  ARM_COMPUTE_UNUSED(multiplier);
164  ARM_COMPUTE_RETURN_ERROR_ON(multiplier > 1.0f);
165  }
166 
167  if(needs_permute)
168  {
169  TensorShape permuted_input_shape = input->tensor_shape();
170  TensorShape permuted_weights_shape = weights->tensor_shape();
171  TensorShape permuted_output_shape = shape_calculator::compute_depthwise_convolution_shape(*input, *weights, conv_info, depth_multiplier, dilation);
172 
173  permute(permuted_input_shape, PermutationVector(1U, 2U, 0U));
174  permute(permuted_weights_shape, PermutationVector(1U, 2U, 0U));
175  permute(permuted_output_shape, PermutationVector(1U, 2U, 0U));
176 
177  const TensorInfo permuted_input = input->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(permuted_input_shape).set_data_layout(DataLayout::NCHW);
178  const TensorInfo permuted_weights = weights->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(permuted_weights_shape).set_data_layout(DataLayout::NCHW);
179  const TensorInfo permuted_output = output->clone()->set_is_resizable(true).reset_padding().set_tensor_shape(permuted_output_shape).set_data_layout(DataLayout::NCHW);
180 
181  ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseConvolutionLayer3x3NCHWKernel::validate(&permuted_input, &permuted_weights, biases, &permuted_output, conv_info, depth_multiplier, act_info, gpu_target,
182  dilation));
183  }
184  else if(is_nhwc)
185  {
186  if(needs_weights_reshape)
187  {
189  ARM_COMPUTE_RETURN_ON_ERROR(CLDepthwiseConvolutionLayer3x3NHWCKernel::validate(input, &weights->clone()->set_tensor_shape(reshaped_weights_shape), biases, output, conv_info, depth_multiplier,
190  act_info, dilation));
191  }
192  else
193  {
195  }
196  }
197  else
198  {
200  }
201 
202  return Status{};
203 }
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U))
Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLa...
bool dot8_supported(const cl::Device &device)
Helper function to check whether the cl_arm_integer_dot_product_int8 extension is supported.
Definition: CLHelpers.cpp:149
TensorShape compute_depthwise_convolution_shape(const ITensorInfo &input, const ITensorInfo &weights, PadStrideInfo conv_info, unsigned int depth_multiplier, const Size2D &dilation=Size2D(1U, 1U))
Calculate the depthwise convolution output shape of a tensor.
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Definition: Error.h:193
Strides PermutationVector
Permutation vector.
Definition: Types.h:47
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
TensorShape compute_reshaped_depthwise_weights_shape(const ITensorInfo &input, const DepthwiseConvolutionReshapeInfo &info)
Calculate the reshaped shape of the weights to use in depthwise convolution.
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
Definition: Error.h:244
void permute(Dimensions< T > &dimensions, const PermutationVector &perm)
Permutes given Dimensions according to a permutation vector.
Definition: Helpers.h:570
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Definition: Error.h:160
Num samples, channels, height, width.
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
Definition: Utils.h:1030
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Definition: Validate.h:163
static Status validate(const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier, ActivationLayerInfo act_info=ActivationLayerInfo(), GPUTarget gpu_target=GPUTarget::MIDGARD, const Size2D &dilation=Size2D(1U, 1U))
Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLa...
Num samples, height, width, channels.

References arm_compute::test::validation::act_info, ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, ARM_COMPUTE_UNUSED, ICloneable< T >::clone(), arm_compute::misc::shape_calculator::compute_depthwise_convolution_shape(), arm_compute::misc::shape_calculator::compute_reshaped_depthwise_weights_shape(), arm_compute::test::validation::conv_info, ITensorInfo::data_layout(), ITensorInfo::data_type(), arm_compute::test::validation::dilation, arm_compute::dot8_supported(), CLKernelLibrary::get(), arm_compute::test::validation::info, arm_compute::is_data_type_quantized_asymmetric(), arm_compute::NCHW, arm_compute::NHWC, arm_compute::permute(), ITensorInfo::quantization_info(), UniformQuantizationInfo::scale, ITensorInfo::tensor_shape(), ITensorInfo::total_size(), arm_compute::U, QuantizationInfo::uniform(), arm_compute::UNKNOWN, CLDepthwiseConvolutionLayer3x3NCHWKernel::validate(), CLDepthwiseConvolutionLayer3x3NHWCKernel::validate(), and arm_compute::test::validation::weights.

Referenced by CLDepthwiseConvolutionLayer::validate().


The documentation for this class was generated from the following files: