21.02
|
Interface for the pooling layer kernel. More...
#include <CpuPoolingKernel.h>
Public Member Functions | |
CpuPoolingKernel ()=default | |
Default constructor. More... | |
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE (CpuPoolingKernel) | |
void | configure (ITensorInfo *src, ITensorInfo *dst, const PoolingLayerInfo &pool_info, ITensorInfo *indices=nullptr) |
Configure kernel for a given list of arguments. More... | |
void | run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. More... | |
BorderSize | border_size () const override |
The size of the border for that kernel. More... | |
const char * | name () const override |
Name of the kernel. More... | |
Public Member Functions inherited from ICPPKernel | |
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... | |
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... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *src, const ITensorInfo *dst, const PoolingLayerInfo &pool_info, const ITensorInfo *indices=nullptr) |
Static function to check if given info will lead to a valid configuration of CpuPoolingKernel. More... | |
Interface for the pooling layer kernel.
Definition at line 38 of file CpuPoolingKernel.h.
|
default |
Default constructor.
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE | ( | CpuPoolingKernel | ) |
|
overridevirtual |
The size of the border for that kernel.
Reimplemented from IKernel.
Definition at line 380 of file CpuPoolingKernel.cpp.
void configure | ( | ITensorInfo * | src, |
ITensorInfo * | dst, | ||
const PoolingLayerInfo & | pool_info, | ||
ITensorInfo * | indices = nullptr |
||
) |
Configure kernel for a given list of arguments.
[in] | src | Source tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. |
[out] | dst | Destination tensor info. Data types supported: Same as src . |
[in] | pool_info | Contains pooling operation information described in PoolingLayerInfo. |
[out] | indices | (optional) The indices of the maximal values. Data type supported: U32. |
Definition at line 385 of file CpuPoolingKernel.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::calculate_max_window(), arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), PoolingLayerInfo::data_layout, ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, PoolingLayerInfo::is_global_pooling, arm_compute::NHWC, ITensorInfo::num_dimensions(), PoolingLayerInfo::pad_stride_info, pool_size, PoolingLayerInfo::pool_size, arm_compute::scaled_dimensions(), Dimensions< T >::set_num_dimensions(), ITensorInfo::set_valid_region(), PadStrideInfo::stride(), ITensorInfo::tensor_shape(), arm_compute::UNKNOWN, arm_compute::validate_arguments(), Size2D::width, and arm_compute::WIDTH.
|
overridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 540 of file CpuPoolingKernel.cpp.
|
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 481 of file CpuPoolingKernel.cpp.
References arm_compute::ACL_DST_0, arm_compute::ACL_DST_1, arm_compute::ACL_SRC_0, ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, ARM_COMPUTE_UNUSED, ITensorInfo::data_type(), ITensorInfo::dimension(), Window::DimX, Window::DimY, Window::DimZ, arm_compute::test::validation::dst, Window::Dimension::end(), arm_compute::F16, arm_compute::F32, ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), ITensor::info(), arm_compute::NCHW, pool_size, pool_stride_x, arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, Window::set(), arm_compute::test::validation::src, Window::Dimension::start(), IKernel::window(), Window::x(), and Window::y().
|
static |
Static function to check if given info will lead to a valid configuration of CpuPoolingKernel.
[in] | src | Source tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. |
[in] | dst | Destination tensor info. Data types supported: Same as src . |
[in] | pool_info | Contains pooling operation information described in PoolingLayerInfo. |
[in] | indices | (optional) The indices of the maximal values. Data type supported: U32. |
Definition at line 441 of file CpuPoolingKernel.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, ICloneable< T >::clone(), arm_compute::test::validation::data_layout, ITensorInfo::data_layout(), PoolingLayerInfo::data_layout, ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), Size2D::height, arm_compute::HEIGHT, arm_compute::test::validation::idx_height, arm_compute::test::validation::idx_width, PoolingLayerInfo::is_global_pooling, num_elems_processed_per_iteration, PoolingLayerInfo::pad_stride_info, PoolingLayerInfo::pool_size, arm_compute::scaled_dimensions(), arm_compute::UNKNOWN, arm_compute::validate_arguments(), Size2D::width, and arm_compute::WIDTH.
Referenced by CpuPooling::validate().