24.02.1
|
Go to the documentation of this file.
43 struct BoundingBoxTransformSelectorData
48 using BoundingBoxTransformSelctorPtr = std::add_pointer<bool(
const BoundingBoxTransformSelectorData &data)>
::type;
49 using BoundingBoxTransformUKernelPtr = std::add_pointer<void(
const ITensor *boxes,
51 const ITensor *deltas,
52 BoundingBoxTransformInfo bbinfo,
53 const Window &window)>
::type;
55 struct BoundingBoxTransformKernel
62 static const BoundingBoxTransformKernel available_kernels[] = {
63 {
"fp32_neon_boundingboxtransform",
64 [](
const BoundingBoxTransformSelectorData &data) {
return data.dt ==
DataType::F32; },
66 #ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
67 {
"fp16_neon_boundingboxtransform",
68 [](
const BoundingBoxTransformSelectorData &data) {
return data.dt ==
DataType::F16; },
70 #endif // __ARM_FEATURE_FP16_VECTOR_ARITHMETIC
71 #if defined(ARM_COMPUTE_ENABLE_NEON)
72 {
"qu16_neon_boundingboxtransform",
73 [](
const BoundingBoxTransformSelectorData &data) {
return data.dt ==
DataType::QASYMM16; },
75 #endif //defined(ARM_COMPUTE_ENABLE_NEON)
84 const BoundingBoxTransformKernel *get_implementation(
const BoundingBoxTransformSelectorData &data)
86 for (
const auto &uk : available_kernels)
88 if (uk.is_selected(data))
97 const ITensorInfo *pred_boxes,
98 const ITensorInfo *deltas,
99 const BoundingBoxTransformInfo &
info)
115 const UniformQuantizationInfo deltas_qinfo = deltas->quantization_info().uniform();
124 if (pred_boxes->total_size() > 0)
131 const UniformQuantizationInfo pred_qinfo = pred_boxes->quantization_info().uniform();
142 : _boxes(nullptr), _pred_boxes(nullptr), _deltas(nullptr), _bbinfo(0, 0, 0)
162 _pred_boxes = pred_boxes;
171 INEKernel::configure(win);
189 const auto *uk = get_implementation(BoundingBoxTransformSelectorData{_boxes->
info()->
data_type()});
192 uk->ukernel(_boxes, _pred_boxes, _deltas, _bbinfo,
window);
Class to describe a number of elements in each dimension.
void neon_fp32_boundingboxtransform(const ITensor *boxes, ITensor *pred_boxes, const ITensor *deltas, BoundingBoxTransformInfo bbinfo, const Window &window)
@ QASYMM16
quantized, asymmetric fixed-point 16-bit number
decltype(strategy::transforms) typedef type
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
@ QASYMM8
quantized, asymmetric fixed-point 8-bit number unsigned
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
static constexpr size_t DimX
Alias for dimension 0 also known as X dimension.
void neon_fp16_boundingboxtransform(const ITensor *boxes, ITensor *pred_boxes, const ITensor *deltas, BoundingBoxTransformInfo bbinfo, const Window &window)
Interface for CPU tensor.
#define REGISTER_FP16_NEON(func_name)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
virtual size_t dimension(size_t index) const =0
Return the size of the requested dimension.
#define REGISTER_FP32_NEON(func_name)
#define REGISTER_QSYMM16_NEON(func_name)
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
#define ARM_COMPUTE_ERROR_THROW_ON(status)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_NOT_IN(t,...)
#define ARM_COMPUTE_RETURN_ERROR_ON(cond)
If the condition is true, an error is returned.
#define ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(tensor)
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
virtual DataType data_type() const =0
Data type used for each element of the tensor.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
Describe one of the image's dimensions with a start, end and step.
void set(size_t dimension, const Dimension &dim)
Set the values of a given dimension.
static constexpr size_t DimY
Alias for dimension 1 also known as Y dimension.
virtual QuantizationInfo quantization_info() const =0
Get the quantization settings (scale and offset) of the tensor.
void neon_qu16_boundingboxtransform(const ITensor *boxes, ITensor *pred_boxes, const ITensor *deltas, BoundingBoxTransformInfo bbinfo, const Window &window)
const Window & window() const
The maximum window the kernel can be executed on.
Information about executing thread and CPU.
virtual std::unique_ptr< T > clone() const =0
Provide a clone of the current object of class T.
Describe a multidimensional execution window.
Copyright (c) 2017-2024 Arm Limited.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DIMENSIONS(...)
@ F16
16-bit floating-point number
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
Store the tensor's metadata.
@ F32
32-bit floating-point number
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
DataType
Available data types.