21.08
|
Kernel to perform Winograd weights transform. More...
#include <CpuWinogradConv2dKernel.h>
Public Member Functions | |
CpuWinogradConv2dTransformWeightsKernel (const CpuWinogradConv2dTransformWeightsKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CpuWinogradConv2dTransformWeightsKernel & | operator= (const CpuWinogradConv2dTransformWeightsKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CpuWinogradConv2dTransformWeightsKernel (CpuWinogradConv2dTransformWeightsKernel &&)=default | |
Allow instances of this class to be moved. More... | |
CpuWinogradConv2dTransformWeightsKernel & | operator= (CpuWinogradConv2dTransformWeightsKernel &&)=default |
Allow instances of this class to be moved. More... | |
~CpuWinogradConv2dTransformWeightsKernel ()=default | |
Default destructor. More... | |
CpuWinogradConv2dTransformWeightsKernel () | |
Default constructor. More... | |
const char * | name () const override |
Name of the kernel. More... | |
unsigned int | get_weight_storage_size (int num_output_channels, int num_input_channels) const override |
Determine how much memory (in units of T) to allocate for the transformed weights. More... | |
int | get_matrix_stride (int num_output_channels, int num_input_channels) const override |
Gets the stride between matrices in the input worspace. More... | |
void | run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. More... | |
bool | is_parallelisable () const override |
Indicates whether or not the kernel is parallelisable. More... | |
![]() | |
ICpuWinogradConv2dTransformWeightsKernel (const ICpuWinogradConv2dTransformWeightsKernel &)=default | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICpuWinogradConv2dTransformWeightsKernel & | operator= (const ICpuWinogradConv2dTransformWeightsKernel &)=default |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICpuWinogradConv2dTransformWeightsKernel (ICpuWinogradConv2dTransformWeightsKernel &&)=default | |
Allow instances of this class to be moved. More... | |
ICpuWinogradConv2dTransformWeightsKernel & | operator= (ICpuWinogradConv2dTransformWeightsKernel &&)=default |
Allow instances of this class to be moved. More... | |
ICpuWinogradConv2dTransformWeightsKernel () | |
virtual | ~ICpuWinogradConv2dTransformWeightsKernel () |
virtual void | configure (const ITensorInfo *weights_hwio, ITensorInfo *output, const int matrix_stride, const int num_output_channels, const int num_input_channels)=0 |
Configure the weights transform kernel. More... | |
![]() | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
virtual void | run (const Window &window, const ThreadInfo &info) |
Execute the kernel on the passed window. More... | |
virtual void | run_nd (const Window &window, const ThreadInfo &info, const Window &thread_locator) |
legacy compatibility layer for implemantions which do not support thread_locator In these cases we simply narrow the interface down the legacy version More... | |
![]() | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
bool | is_window_configured () const |
Function to check if the embedded window of this kernel has been configured. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *output, const WinogradInfo &winograd_info) |
Static function to check if given info will lead to a valid configuration of CpuWinogradConv2dTransformWeightsKernel. More... | |
![]() | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights) |
Static function to check if given info will lead to a valid configuration of CpuWinogradConv2dTransformWeightsKernel. More... | |
Kernel to perform Winograd weights transform.
Definition at line 480 of file CpuWinogradConv2dKernel.h.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
default |
Default destructor.
Default constructor.
Definition at line 202 of file CpuWinogradConv2dKernel.cpp.
|
overridevirtual |
Gets the stride between matrices in the input worspace.
[in] | num_output_channels | Number of output feature maps. |
[in] | num_input_channels | Number of input feature maps. |
Implements ICpuWinogradConv2dTransformWeightsKernel.
Definition at line 208 of file CpuWinogradConv2dKernel.cpp.
References ARM_COMPUTE_UNUSED, ICpuWinogradConv2dTransformWeightsKernel::configure(), Window::DimX, and Window::set().
|
overridevirtual |
Determine how much memory (in units of T) to allocate for the transformed weights.
[in] | num_output_channels | Number of output feature maps. |
[in] | num_input_channels | Number of input feature maps. |
Implements ICpuWinogradConv2dTransformWeightsKernel.
Definition at line 194 of file CpuWinogradConv2dKernel.cpp.
References arm_compute::test::validation::shape.
|
overridevirtual |
Indicates whether or not the kernel is parallelisable.
If the kernel is parallelisable then the window returned by window() can be split into sub-windows which can then be run in parallel.
If the kernel is not parallelisable then only the window returned by window() can be passed to run()
Reimplemented from IKernel.
Definition at line 257 of file CpuWinogradConv2dKernel.cpp.
|
inlineoverridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 496 of file CpuWinogradConv2dKernel.h.
References ICpuWinogradConv2dTransformInputKernel::configure(), ICpuWinogradConv2dTransformInputKernel::get_matrix_stride(), arm_compute::test::validation::info, arm_compute::test::validation::input, IKernel::is_parallelisable(), ICPPKernel::run_op(), arm_compute::validate(), and IKernel::window().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Execute the kernel on the passed window.
[in] | tensors | A vector containing the tensors to operate on. |
[in] | window | Region on which to execute the kernel. (Must be a region of the window returned by window()) |
[in] | info | Info about executing thread and CPU. |
Reimplemented from ICPPKernel.
Definition at line 236 of file CpuWinogradConv2dKernel.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, ARM_COMPUTE_UNUSED, ITensor::buffer(), ITensorPack::empty(), Window::Dimension::end(), ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), arm_gemm::roundup(), Window::Dimension::start(), and Window::x().
|
static |
Static function to check if given info will lead to a valid configuration of CpuWinogradConv2dTransformWeightsKernel.
[in] | input | Source tensor info. The input is a 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM] (NCHW data layout). kernel_x must be 3 and equal to kernel_y. Data types supported: F16/F32. |
[in] | output | Destination tensor info. The output is a 3D tensor with dimensions [OFM, IFM, 16] or [OFM, IFM, 36]. Data type supported: same as input |
[in] | winograd_info | Contains Winograd's information described in WinogradInfo |
Definition at line 263 of file CpuWinogradConv2dKernel.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, and ICloneable< T >::clone().