21.02
|
Interface for the kernel to run a 3x3 depthwise convolution on a tensor. More...
#include <GCDepthwiseConvolutionLayer3x3Kernel.h>
Public Member Functions | |
GCDepthwiseConvolutionLayer3x3Kernel () | |
Default constructor. More... | |
GCDepthwiseConvolutionLayer3x3Kernel (const GCDepthwiseConvolutionLayer3x3Kernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
GCDepthwiseConvolutionLayer3x3Kernel & | operator= (const GCDepthwiseConvolutionLayer3x3Kernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
GCDepthwiseConvolutionLayer3x3Kernel (GCDepthwiseConvolutionLayer3x3Kernel &&)=default | |
Default Move Constructor. More... | |
GCDepthwiseConvolutionLayer3x3Kernel & | operator= (GCDepthwiseConvolutionLayer3x3Kernel &&)=default |
Default move assignment operator. More... | |
void | configure (const IGCTensor *input, const IGCTensor *weights, const IGCTensor *biases, IGCTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1) |
Initialize the function's source, destination, conv and border_size. More... | |
void | run (const Window &window) override |
Enqueue the OpenGL ES shader to process the given window. More... | |
BorderSize | border_size () const override |
The size of the border for that kernel. More... | |
Public Member Functions inherited from IGCKernel | |
IGCKernel () | |
Constructor. More... | |
GCKernel & | kernel () |
Returns a reference to the GLES kernel of this object. More... | |
void | add_1D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 1D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
void | add_2D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 2D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
void | add_3D_tensor_argument (unsigned int &idx, const IGCTensor *tensor, const unsigned int binding_point, const Window &window) |
Add the passed 3D tensor's parameters to the object's kernel's arguments starting from the index idx. More... | |
unsigned int | num_arguments_per_1D_tensor () const |
Returns the number of arguments enqueued per 1D tensor object. More... | |
unsigned int | num_arguments_per_2D_tensor () const |
Returns the number of arguments enqueued per 2D tensor object. More... | |
unsigned int | num_arguments_per_3D_tensor () const |
Returns the number of arguments enqueued per 3D tensor object. More... | |
void | set_lws_hint (gles::NDRange &lws_hint) |
Set the Local-Workgroup-Size hint. More... | |
void | set_target (GPUTarget target) |
Set the targeted GPU architecture. More... | |
GPUTarget | get_target () const |
Get the targeted GPU architecture. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Interface for the kernel to run a 3x3 depthwise convolution on a tensor.
Definition at line 35 of file GCDepthwiseConvolutionLayer3x3Kernel.h.
Default constructor.
Definition at line 44 of file GCDepthwiseConvolutionLayer3x3Kernel.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Default Move Constructor.
|
overridevirtual |
The size of the border for that kernel.
Reimplemented from IKernel.
Definition at line 49 of file GCDepthwiseConvolutionLayer3x3Kernel.cpp.
void configure | ( | const IGCTensor * | input, |
const IGCTensor * | weights, | ||
const IGCTensor * | biases, | ||
IGCTensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
unsigned int | depth_multiplier = 1 |
||
) |
Initialize the function's source, destination, conv and border_size.
[in] | input | Source tensor. DataType supported: F16. |
[in] | weights | Weights tensor. A 3D tensor with dimensions [3, 3, IFM]. Data type supported: Same as input . |
[in] | biases | (Optional) Biases tensor. A 1D tensor with dimensions [IFM]. Must be nullptr if not needed. Data type supported: Same as input . |
[out] | output | Destination tensor. Data type supported: Same as input . |
[in] | conv_info | Padding 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. |
Definition at line 54 of file GCDepthwiseConvolutionLayer3x3Kernel.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS, arm_compute::auto_init_if_empty(), BorderSize::bottom, arm_compute::calculate_max_enlarged_window(), arm_compute::ceil_to_multiple(), arm_compute::misc::shape_calculator::compute_depthwise_convolution_shape(), arm_compute::test::validation::conv_info, GCKernelLibrary::create_kernel(), ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::F16, arm_compute::F32, GCKernelLibrary::get(), ITensor::info(), arm_compute::test::validation::input, input_height, input_width, kernel_name, BorderSize::left, ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, PadStrideInfo::pad_bottom(), PadStrideInfo::pad_left(), PadStrideInfo::pad_right(), PadStrideInfo::pad_top(), ITensorInfo::padding(), BorderSize::right, PadStrideInfo::stride(), ITensorInfo::tensor_shape(), arm_compute::support::cpp11::to_string(), BorderSize::top, and arm_compute::update_window_and_padding().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
overridevirtual |
Enqueue the OpenGL ES shader to process the given window.
[in] | window | Region on which to execute the kernel. (Must be a valid region of the window returned by window()). |
Implements IGCKernel.
Definition at line 208 of file GCDepthwiseConvolutionLayer3x3Kernel.cpp.
References IGCKernel::add_1D_tensor_argument(), IGCKernel::add_3D_tensor_argument(), Window::adjust(), ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, Window::DimX, Window::DimY, arm_compute::enqueue(), Window::first_slice_window_3D(), ITensor::info(), IGCKernel::num_arguments_per_3D_tensor(), ITensorInfo::padding(), Window::set_dimension_step(), IGCTensor::set_needs_shifting(), Window::shift(), Window::slide_window_slice_3D(), Window::Dimension::step(), ITensorInfo::tensor_shape(), Window::use_tensor_dimensions(), IKernel::window(), Window::x(), and Window::y().