36 : _memory_group(
std::move(memory_manager)),
38 _is_global_pooling_layer(false)
55 auto pooling_wrapper = std::make_unique<kernels::CpuPoolingAssemblyWrapperKernel>();
57 pooling_wrapper->configure(src, dst, info, ci);
63 constexpr
size_t alignment = 4096;
64 const size_t workspace_size = pooling_wrapper->get_working_size(num_threads);
66 _memory_group.
manage(&_workspace);
69 _kernel = std::move(pooling_wrapper);
79 return _kernel !=
nullptr;
88 if(_is_global_pooling_layer)
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
void init(const TensorAllocator &allocator, const Coordinates &coords, TensorInfo &sub_info)
Shares the same backing memory with another tensor allocator, while the tensor info might be differen...
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
bool empty() const
Checks if pack is empty.
virtual void schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors)=0
Runs the kernel in the same thread as the caller synchronously.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const PoolingLayerInfo &info)
Indicates whether or not this function can be used to process the given parameters.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
Store the tensor's metadata.
CPUInfo & cpu_info()
Get CPU info.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
size_t height
Height of the image region or rectangle.
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const PoolingLayerInfo &info)
Indicates whether or not this function can be used to process the given parameters.
void manage(IMemoryManageable *obj) override
Sets a object to be managed by the given memory group.
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
Pooling Layer Information struct.
bool is_configured() const
Was the function successfully configured ?
CpuPoolingAssemblyDispatch(std::shared_ptr< IMemoryManager > memory_manager=nullptr)
Constructor.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
void configure(const ITensorInfo *src, ITensorInfo *dst, const PoolingLayerInfo &info)
If supported create an assembly routine, else fallback to Compute Library function.
size_t width
Width of the image region or rectangle.
Store the tensor's metadata.
virtual unsigned int num_threads() const =0
Returns the number of threads that the SingleThreadScheduler has in his pool.
~CpuPoolingAssemblyDispatch()
Destructor.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
static IScheduler & get()
Access the scheduler singleton.