Compute Library
 21.02
CLWinogradInputTransform Class Reference

Basic function to execute a CLWinogradInputTransformKernel. More...

#include <CLWinogradInputTransform.h>

Collaboration diagram for CLWinogradInputTransform:
[legend]

Public Member Functions

void configure (ICLTensor *input, ICLTensor *output, const WinogradInfo &winograd_info)
 Set the input and output tensors. More...
 
void configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, const WinogradInfo &winograd_info)
 Set the input and output tensors. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction (CLRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 ICLSimpleFunction (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 ICLSimpleFunction (ICLSimpleFunction &&)=default
 Default move constructor. More...
 
ICLSimpleFunctionoperator= (const ICLSimpleFunction &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
ICLSimpleFunctionoperator= (ICLSimpleFunction &&)=default
 Default move assignment operator. More...
 
 ~ICLSimpleFunction ()
 Default destructor. More...
 
void run () override final
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from IFunction
virtual ~IFunction ()=default
 Destructor. More...
 
virtual void prepare ()
 Prepare the function for executing. 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 CLWinogradInputTransform. More...
 

Detailed Description

Basic function to execute a CLWinogradInputTransformKernel.

Definition at line 39 of file CLWinogradInputTransform.h.

Member Function Documentation

◆ configure() [1/2]

void configure ( ICLTensor input,
ICLTensor output,
const WinogradInfo winograd_info 
)

Set the input and output tensors.

Note
Winograd input transform supports the following configurations for NCWH data layout F(output tile, kernel size):F(2x2, 3x3), F(2x1, 3x1), F(1x2, 1x3), F(4x4, 3x3), F(4x1, 3x1), F(1x4, 1x3), F(4x4, 5x5), F(4x1, 5x1), F(1x4, 1x5)
Winograd input transform supports the following configurations for NHWC data layout F(output tile, kernel size):F(4x4, 3x3), F(4x1, 3x1), F(1x4, 1x3), F(4x4, 5x5), F(4x1, 5x1), F(1x4, 1x5)

Strides: only unit strides

Parameters
[in]inputThe input tensor to transform. Data types supported: F16,F32
[in]outputThe output tensor. The shape for this tensor can be calculated using the utility function compute_winograd_input_transform_shape. Data types supported: Same as input
[in]winograd_infoContains Winograd's information described in WinogradInfo.

Definition at line 33 of file CLWinogradInputTransform.cpp.

References CLKernelLibrary::get().

Referenced by CLWinogradConvolutionLayer::configure().

34 {
35  configure(CLKernelLibrary::get().get_compile_context(), input, output, winograd_info);
36 }
static CLKernelLibrary & get()
Access the KernelLibrary singleton.
void configure(ICLTensor *input, ICLTensor *output, const WinogradInfo &winograd_info)
Set the input and output tensors.

◆ configure() [2/2]

void configure ( const CLCompileContext compile_context,
ICLTensor input,
ICLTensor output,
const WinogradInfo winograd_info 
)

Set the input and output tensors.

Note
Winograd input transform supports the following configurations for NCWH data layout F(output tile, kernel size):F(2x2, 3x3), F(2x1, 3x1), F(1x2, 1x3), F(4x4, 3x3), F(4x1, 3x1), F(1x4, 1x3), F(4x4, 5x5), F(4x1, 5x1), F(1x4, 1x5)
Winograd input transform supports the following configurations for NHWC data layout F(output tile, kernel size):F(4x4, 3x3), F(4x1, 3x1), F(1x4, 1x3), F(4x4, 5x5), F(4x1, 5x1), F(1x4, 1x5)

Strides: only unit strides

Parameters
[in]compile_contextThe compile context to be used.
[in]inputThe input tensor to transform. Data types supported: F16,F32
[in]outputThe output tensor. The shape for this tensor can be calculated using the utility function compute_winograd_input_transform_shape. Data types supported: Same as input
[in]winograd_infoContains Winograd's information described in WinogradInfo.

Definition at line 38 of file CLWinogradInputTransform.cpp.

References arm_compute::CONSTANT.

39 {
40  auto k = std::make_unique<CLWinogradInputTransformKernel>();
41  k->configure(compile_context, input, output, winograd_info);
42  _kernel = std::move(k);
43  _border_handler->configure(compile_context, input, _kernel->border_size(), BorderMode::CONSTANT, PixelValue());
44 }
Class describing the value of a pixel for any image format.
Definition: PixelValue.h:34

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output,
const WinogradInfo winograd_info 
)
static

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

Note
Winograd input transform supports the following configurations for NCWH data layout F(output tile, kernel size):F(2x2, 3x3), F(2x1, 3x1), F(1x2, 1x3), F(4x4, 3x3), F(4x1, 3x1), F(1x4, 1x3), F(4x4, 5x5), F(4x1, 5x1), F(1x4, 1x5)
Winograd input transform supports the following configurations for NHWC data layout F(output tile, kernel size):F(4x4, 3x3), F(4x1, 3x1), F(1x4, 1x3), F(4x4, 5x5), F(4x1, 5x1), F(1x4, 1x5)

Strides: only unit strides

Parameters
[in]inputThe input tensor to transform. Data types supported: F16,F32
[in]outputThe output tensor. The shape for this tensor can be calculated using the utility function compute_winograd_input_transform_shape. Data types supported: Same as input
[in]winograd_infoContains Winograd's information described in WinogradInfo.
Returns
a status

Definition at line 46 of file CLWinogradInputTransform.cpp.

References ARM_COMPUTE_RETURN_ON_ERROR, and CLWinogradInputTransformKernel::validate().

Referenced by arm_compute::test::validation::DATA_TEST_CASE(), and CLWinogradConvolutionLayer::validate().

47 {
49  return Status{};
50 }
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 CLWinogradInputTransform...
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
Definition: Error.h:204
Status class.
Definition: Error.h:52

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