40 auto k = std::make_unique<kernels::ClPoolingKernel>();
42 k->configure(compile_context, src, dst, info, indices);
43 _pooling = std::move(k);
69 std::tie(pixel_value, std::ignore) =
get_min_max(data_type);
80 auto b = std::make_unique<CLFillBorderKernel>();
81 b->configure(compile_context, src, _pooling->border_size(), border_mode, pixel_value);
82 _border_handler = std::move(
b);
static Status validate(const ITensorInfo *src, const ITensorInfo *dst, const PoolingLayerInfo &info, const ITensorInfo *indices=nullptr)
Static function to check if given info will lead to a valid configuration of ClPooling.
BorderMode
Methods available to handle borders.
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
void run(ITensorPack &tensors) override
Run the kernels contained in the function.
Class describing the value of a pixel for any image format.
static CLScheduler & get()
Access the scheduler singleton.
bool empty() const
Checks if pack is empty.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
virtual DataType data_type() const =0
Data type used for each element of the tensor.
const DataLayout data_layout
Store the tensor's metadata.
SimpleTensor< float > src
Copyright (c) 2017-2021 Arm Limited.
Interface to enqueue OpenCL kernels and get/set the OpenCL CommandQueue and ICLTuner.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
void enqueue_op(ICLKernel &kernel, ITensorPack &tensors, bool flush=true)
Schedule the execution of the passed kernel if possible.
Pooling Layer Information struct.
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
Num samples, channels, height, width.
bool is_data_type_quantized_asymmetric(DataType dt)
Check if a given data type is of asymmetric quantized type.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
void configure(const ClCompileContext &compile_context, ITensorInfo *src, ITensorInfo *dst, const PoolingLayerInfo &info, ITensorInfo *indices=nullptr)
Configure operator for a given list of arguments.
Pixels outside the image are assumed to have the same value as the closest image pixel.
Num samples, height, width, channels.
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
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 ClPoolingKernel.
void tune_kernel_static(ICLKernel &kernel)
Tunes OpenCL kernel.
DataType
Available data types.
std::tuple< PixelValue, PixelValue > get_min_max(DataType dt)
Compute the mininum and maximum values a data type can take.
virtual DataLayout data_layout() const =0
Get the data layout of the tensor.