24 #ifndef __ARM_COMPUTE_TYPE_PRINTER_H__ 25 #define __ARM_COMPUTE_TYPE_PRINTER_H__ 74 inline ::std::ostream &operator<<(::std::ostream &os, const Dimensions<T> &dimensions)
76 if(dimensions.num_dimensions() > 0)
80 for(
unsigned int d = 1; d < dimensions.num_dimensions(); ++d)
82 os <<
"x" << dimensions[d];
124 std::stringstream
str;
167 std::stringstream
str;
181 switch(rounding_policy)
187 os <<
"TO_NEAREST_UP";
190 os <<
"TO_NEAREST_EVEN";
235 std::stringstream
str;
249 os <<
"( m= " << gemm_info.
m;
250 os <<
" n= " << gemm_info.
n;
251 os <<
" k= " << gemm_info.
k;
258 os <<
" a_offset = " << gemm_info.
a_offset;
259 os <<
" b_offset = " << gemm_info.
b_offset;
273 os <<
"( m0= " << (
unsigned int)gemm_info.
m0 <<
" k0= " << gemm_info.
k0 <<
" v0= " << gemm_info.
v0 <<
" trans= " << gemm_info.
transpose <<
" inter= " << gemm_info.
interleave <<
"})";
286 os <<
"( n0= " << (
unsigned int)gemm_info.
n0 <<
" k0= " << gemm_info.
k0 <<
" h0= " << gemm_info.
h0 <<
" trans= " << gemm_info.
transpose <<
" inter= " << gemm_info.
interleave <<
" exp_img=" <<
299 std::stringstream
str;
312 std::stringstream
str;
325 std::stringstream
str;
339 auto weights = bbox_info.
weights();
340 os <<
"(" << bbox_info.
img_width() <<
"x" << bbox_info.
img_height() <<
")~" << bbox_info.
scale() <<
"(weights = {" << weights[0] <<
", " << weights[1] <<
", " << weights[2] <<
", " << weights[3] <<
353 std::stringstream
str;
379 std::stringstream
str;
405 std::stringstream
str;
406 str << proposals_info;
420 os <<
"Scale:" << uqinfo.
scale <<
"~";
421 os <<
"Offset:" << uqinfo.
offset;
433 std::stringstream
str;
434 str << quantization_info;
462 os <<
"BOUNDED_RELU";
474 os <<
"LU_BOUNDED_RELU";
507 std::stringstream
str;
523 std::stringstream
str;
563 std::stringstream
str;
630 std::stringstream
str;
631 str << rounding_policy;
671 std::stringstream
str;
686 switch(data_layout_dim)
730 os <<
"QASYMM8_SIGNED";
733 os <<
"QSYMM8_PER_CHANNEL";
792 std::stringstream
str;
874 std::stringstream
str;
941 std::stringstream
str;
982 os << border.
top <<
"," 983 << border.
right <<
"," 1000 for(
auto const &p : padding)
1002 os <<
"{" << p.first <<
"," << p.second <<
"}";
1018 for(
size_t i = 0; i < multiples.size() - 1; i++)
1020 os << multiples[i] <<
", ";
1022 os << multiples.back() <<
")";
1038 os <<
"NEAREST_NEIGHBOR";
1099 std::stringstream
str;
1110 template <
typename T>
1113 std::stringstream
str;
1126 std::stringstream
str;
1139 std::stringstream
str;
1152 std::stringstream
str;
1166 os <<
"{m=" << info.
m() <<
",";
1167 os <<
"n=" << info.
n() <<
",";
1168 os <<
"k=" << info.
k() <<
",";
1207 os <<
"{start=" << dim.
start() <<
", end=" << dim.
end() <<
", step=" << dim.
step() <<
"}";
1242 std::stringstream
str;
1255 std::stringstream
str;
1268 std::stringstream
str;
1281 std::stringstream
str;
1293 std::stringstream
str;
1308 os <<
"+" << rect.
x <<
"+" << rect.
y;
1348 std::stringstream
str;
1362 os << pad_stride_info.
stride().first <<
"," << pad_stride_info.
stride().second;
1378 std::stringstream
str;
1379 str << pad_stride_info;
1391 std::stringstream
str;
1404 std::stringstream
str;
1417 std::stringstream
str;
1430 std::stringstream
str;
1443 std::stringstream
str;
1456 std::stringstream
str;
1487 std::stringstream
str;
1519 os <<
"SQUARED_DIFF";
1539 std::stringstream
str;
1565 os <<
"ARG_IDX_MAX";
1568 os <<
"ARG_IDX_MIN";
1594 std::stringstream
str;
1620 os <<
"GreaterEqual";
1676 std::stringstream
str;
1689 std::stringstream
str;
1702 std::stringstream
str;
1715 std::stringstream
str;
1728 std::stringstream
str;
1729 str <<
"{Type=" << info.
pool_type <<
"," 1750 std::stringstream
str;
1752 str <<
"Clip:" << info.
clip()
1753 <<
"Flip:" << info.
flip()
1754 <<
"StepX:" << info.
steps()[0]
1755 <<
"StepY:" << info.
steps()[1]
1756 <<
"MinSizes:" << info.
min_sizes().size()
1757 <<
"MaxSizes:" << info.
max_sizes().size()
1760 <<
"Offset:" << info.
offset()
1761 <<
"Variances:" << info.
variances().size();
1775 os <<
"{x=" << point.
x <<
"," 1776 <<
"y=" << point.
y <<
"," 1777 <<
"strength=" << point.
strength <<
"," 1778 <<
"scale=" << point.
scale <<
"," 1781 <<
"error=" << point.
error <<
"}";
1818 std::stringstream
str;
1832 switch(magnitude_type)
1855 std::stringstream
str;
1895 std::stringstream
str;
1922 std::stringstream
str;
1936 os <<
"{CellSize=" << hog_info.
cell_size() <<
"," 1937 <<
"BlockSize=" << hog_info.
block_size() <<
"," 1940 <<
"NumBins=" << hog_info.
num_bins() <<
"," 1943 <<
"PhaseType=" << hog_info.
phase_type() <<
"}";
1956 std::stringstream
str;
1996 std::stringstream
str;
2013 os <<
"GPU_ARCH_MASK";
2075 std::stringstream
str;
2089 os <<
"{x=" << detection_window.
x <<
"," 2090 <<
"y=" << detection_window.
y <<
"," 2091 <<
"width=" << detection_window.
width <<
"," 2092 <<
"height=" << detection_window.
height <<
"," 2093 <<
"idx_class=" << detection_window.
idx_class <<
"," 2094 <<
"score=" << detection_window.
score <<
"}";
2108 switch(detection_code)
2111 os <<
"CENTER_SIZE";
2117 os <<
"CORNER_SIZE";
2136 std::stringstream
str;
2137 str << detection_code;
2150 os <<
"{Classes=" << detection_info.
num_classes() <<
"," 2152 <<
"CodeType=" << detection_info.
code_type() <<
"," 2154 <<
"KeepTopK=" << detection_info.
keep_top_k() <<
"," 2156 <<
"Eta=" << detection_info.
eta() <<
"," 2159 <<
"TopK=" << detection_info.
top_k() <<
"," 2174 std::stringstream
str;
2175 str << detection_info;
2187 os <<
"{MaxDetections=" << detection_info.
max_detections() <<
"," 2190 <<
"NmsIouThreshold=" << detection_info.
iou_threshold() <<
"," 2191 <<
"NumClasses=" << detection_info.
num_classes() <<
"," 2211 std::stringstream
str;
2212 str << detection_info;
2223 std::stringstream
str;
2224 str << detection_window;
2240 os <<
"TERM_CRITERIA_EPSILON";
2243 os <<
"TERM_CRITERIA_ITERATIONS";
2246 os <<
"TERM_CRITERIA_BOTH";
2263 std::stringstream
str;
2283 os <<
"GENERIC_FP16";
2286 os <<
"GENERIC_FP16_DOT";
2318 std::stringstream
str;
2329 template <
typename T>
2330 inline ::std::ostream &operator<<(::std::ostream &os, const std::vector<T> &
args)
2334 for(
auto &arg :
args)
2359 os <<
"Clip:" << info.
clip()
2360 <<
"Flip:" << info.
flip()
2361 <<
"StepX:" << info.
steps()[0]
2362 <<
"StepY:" << info.
steps()[1]
2367 <<
"Offset:" << info.
offset()
2379 template <
typename T>
2382 std::stringstream
str;
2400 std::stringstream
str;
2411 template <
typename T>
2429 return std::string(
"Exhaustive");
2433 return std::string(
"Normal");
2437 return std::string(
"Rapid");
2442 return std::string(
"UNDEFINED");
2462 return "Reshaped_V1";
2470 return "Reshaped_Only_RHS";
BorderMode
Methods available to handle borders.
unsigned int top
top of the border
L2-norm followed by clipping.
size_t num_bins() const
The number of histogram bins for each cell.
A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 byte.
bool broadcast_bias
Flag used to broadcast the bias addition.
ArithmeticOperation
Available element-wise operations.
InterpolationPolicy
Interpolation method.
int num_classes() const
Get num classes.
int mult_interleave4x4_height() const
Multiplication factor for the height of the 4x4 interleaved block.
int mult_interleave4x4_height
Multiplication factor for the height of the 4x4 interleaved block.
float scale
Scale initialized to 0 by the corner detector.
Generate Proposals Information class.
Second channel (used by formats with unknown channel types).
const Size2D & detection_window_size() const
The detection window size in pixels.
bool share_location() const
Get share location.
float scale_value_x() const
Get x scale value.
DataLayout output_data_layout
Data layout to use for the output tensor once the convolution has been applied (NCHW or NHWC) ...
bool fp_mixed_precision
Flag used to indicate wider accumulators (32 bit instead of 16 for FP16).
quantized, symmetric fixed-point 16-bit number
Rounds to nearest value; half rounds away from zero.
Use box centers and size.
Descriptor used by the GEMM kernels.
uint16_t x
Top-left x coordinate.
float score
Confidence value for the detection window.
bool enabled() const
Check if initialised.
std::vector< PaddingInfo > PaddingList
List of padding information.
ReductionOperation
Available reduction operations.
const Size2D & cell_size() const
The cell size in pixels.
Container for 2D border size.
size_t num_channels() const override
The number of channels for each tensor element.
PhaseType
Phase calculation type.
unsigned int max_detections() const
Get max detections.
float orientation
Orientation initialized to 0 by the corner detector.
unsigned int v0
Number of vertical blocks of size (m0xk0) stored on the same output row.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
constexpr int step() const
Return the step of the dimension.
unsigned int depth_output_gemm3d
Depth of the output tensor in case is reinterpreted as 3D.
DataLayoutDimension
[DataLayout enum definition]
uint32_t norm_size() const
Get the normalization size.
1 channel, 1 U8 per channel
NormType type() const
Get the normalization type.
int mult_transpose1xW_width() const
Multiplication factor for the width of the 1xW transposed block.
int32_t tracking_status
Status initialized to 1 by the corner detector, set to 0 when the point is lost.
Terminate when within epsilon of a threshold.
GEMM reshape information class.
PadStrideInfo convolution_info
Convolution info (Pads, strides,...)
std::string to_string(T &&value)
Convert integer and float values to string.
Store the HOG's metadata.
bool are_reshaped() const
Flag which specifies if the weights tensor has been reshaped.
1 channel, 1 F32 per channel
Normalization Layer Information class.
Output values are defined by bilinear interpolation between the pixels.
unsigned int h0
Number of horizontal blocks of size (k0xn0) stored on the same output row.
const DataLayout data_layout
bool fp_mixed_precision() const
Flag which specifies if a wider accumulator should be used.
GEMM LHS (Left Hand Side) matrix information.
bool pretranpose_B() const
Flag which specifies whether b should be pre-transposed if supported.
A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
Terminate after a maximum number of iterations.
Describe one of the image's dimensions with a start, end and step.
quantized, asymmetric fixed-point 16-bit number
1 channel, 1 U16 per channel
unsigned int bottom
bottom of the border
CPUModel
CPU models - we only need to detect CPUs we have microarchitecture-specific code for.
Reshaped GEMM kernel where only the rhs matrix is reshaped.
float eta() const
Get eta.
int depth_output_gemm3d() const
Depth of the output when GEMM output is reinterpreted as 3D tensor.
unsigned int pooled_width() const
Get the pooled width of the layer.
unsigned int pad_top() const
Get the top padding.
Output values are defined to match the source pixel whose center is nearest to the sample position...
bool retain_internal_weights() const
Flag which specifies if the weights tensor has to be retained from previous run.
CLGEMMKernelType
OpenCL GEMM kernel types.
DetectionOutputLayerCodeType
Available Detection Output code types.
ConvolutionMethod
Available ConvolutionMethod.
Reshaped GEMM kernel where both lhs and rhs matrices are reshaped.
Activation Layer Information class.
decltype(strategy::transforms) typedef type
PhaseType phase_type() const
The type of PhaseType.
float spatial_scale() const
const Size2D & block_stride() const
The block stride in pixels.
Terminate on whichever of the other conditions occurs first.
A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
bool use_regular_nms() const
Get if use regular nms.
HOGNormType normalization_type() const
The normalization type.
bool transpose
True if the (k0xn0) block has to be transposed before been stored.
bool interleave
True if the v0 (m0xk0) blocks have to be interleaved in the output row.
bool export_to_cl_image
True if the reshaped rhs has to be exported to cl_image.
int top_k() const
Get top K.
float feat_height() const
Copyright (c) 2017-2021 Arm Limited.
size_t height
Height of the image region or rectangle.
bool is_b_reshaped() const
Flag which specifies if the matrix B has been reshaped.
ActivationFunction
Available activation functions.
1 channel, 1 F16 per channel
Samples are taken at pixel center.
Greater equal comparison ( )
float iou_threshold() const
Get intersection over union threshold.
float strength
Strength of the point.
DataType data_type() const override
Data type used for each element of the tensor.
Convolution Layer Weights Information class.
1 channel, 1 S32 per channel
bool variance_encoded_in_target() const
Get if variance encoded in target.
16-bit brain floating-point number
bool transpose
True if the (m0xk0) block has to be transposed before been stored.
int n() const
Number of matrix B columns.
Searches a minimal subset of LWS configurations while tuning.
Native GEMM kernel with fixed block size.
3 channels, 1 U8 per channel
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
unsigned int m
Number of LHS rows.
Quantization information.
unsigned int n
Number of RHS columns.
float error
Tracking error initialized to 0 by the corner detector.
Exponential Linear Unit ( )
std::array< float, 2 > steps() const
Get the step coordinates.
float nms_threshold() const
Get nms threshold.
Third channel (used by formats with unknown channel types).
1 channel, 1 U32 per channel
GEMM RHS (Right Hand Side) matrix information.
int32_t b_offset
Offset to be added to each element of the matrix B.
Normalization applied within the same map in 1D region.
Size2D output_tile_size
Width and height of the output tile.
Channel
Available channels.
Format
Image colour formats.
PaddingMode
Padding mode to use for PadLayer.
uint16_t width
Width of the detection window.
unsigned int n0
Number of columns processed by the matrix multiplication.
quantized, asymmetric fixed-point 8-bit number unsigned
const Size2D & block_size() const
The block size in pixels.
float scale_value_h() const
Get h scale value.
std::pair< unsigned int, unsigned int > stride() const
Get the stride.
float scale_value_w() const
Get w scale value.
Pooling Layer Information struct.
UniformQuantizationInfo uniform() const
Return per layer quantization info.
float nms_score_threshold() const
Get nms threshold.
Dimensions with dimensionality.
bool reinterpret_input_as_3d
Flag used to reinterpret the input as 3D.
RoundingPolicy
Rounding method.
A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
Samples are taken at pixel top left corner.
float offset() const
Get the offset.
Fourth channel (used by formats with unknown channel types).
DetectionOutputLayerCodeType code_type() const
Get detection output code type.
unsigned int pad_right() const
Get the right padding.
int k() const
Number of matrix A columns or matrix B rows.
float l2_hyst_threshold() const
Threshold used for L2HYS_NORM normalization type.
Padding and stride information class.
ComparisonOperation
Supported comparison operations.
Termination
Termination criteria.
Coordinates2D img_size() const
Get the image size coordinates.
unsigned int num_kernels() const
Return the number of convolution kernels.
bool reinterpret_input_as_3d() const
Flag which specifies if the input tensor has to be reinterpreted as 3D.
unsigned int left
left of the border
unsigned int right
right of the border
1 channel, 1 S16 per channel
bool broadcast_bias() const
Flag which specifies whether to broadcast the shape of the bias tensor.
uint16_t idx_class
Index of the class.
int keep_top_k() const
Get the number of total bounding boxes to be kept per image.
Output values are determined by averaging the source pixels whose areas fall under the area of the de...
quantized, symmetric fixed-point 8-bit number
Num samples, channels, height, width.
unsigned int max_classes_per_detection() const
Get max_classes per detection.
bool is_a_reshaped() const
Flag which specifies if the matrix A has been reshaped.
float scale_value_y() const
Get y scale value.
uint16_t height
Height of the detection window.
Strides of an item in bytes.
quantized, symmetric per channel fixed-point 8-bit number
Convolution using Winograd.
A 3 plane of 8-bit 4:2:0 sampled Y, U, V planes.
Lower and Upper Bounded Rectifier ( )
int32_t a_offset
Offset to be added to each element of the matrix A.
Detection Output layer info.
4 channels, 1 U8 per channel
PoolingType
Available pooling types.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
Rounds to nearest value; half rounds to nearest even.
Upper Bounded Rectifier ( )
PadStrideInfo pad_stride_info
size_t width
Width of the image region or rectangle.
HOGNormType
Normalization type for Histogram of Oriented Gradients (HOG)
GPUTarget
Available GPU Targets.
unsigned int pooled_height() const
Get the pooled height of the layer.
int m() const
Number of matrix A rows.
Borders are left undefined.
ROI Pooling Layer Information class.
Pixels outside the image are assumed to have the same value as the closest image pixel.
Native GEMM kernel with configurable block size.
Class for specifying the size of an image or rectangle.
Detection window used for the object detection.
const QuantizationInfo qinfo
std::vector< float > max_sizes() const
Get max sizes.
ComputeAnchors information class.
CLTunerMode
< OpenCL tuner modes
uint16_t width
Width of the rectangle.
Num samples, height, width, channels.
std::string to_string(const ICLTensor &arg)
unsigned int detection_per_class() const
Get detection per class.
bool flip() const
Get the flip value.
2 channel, 1 U8 per channel
uint16_t y
Top-left y coordinate.
unsigned int k
Number of LHS columns or RHS rows.
float spatial_scale() const
Get the spatial scale.
Less equal comparison ( )
uint16_t y
Top-left y coordinate.
Detection Output layer info.
bool interleave
True if the h0 (k0xn0) blocks have to be interleaved in the output row.
unsigned int num_classes() const
Get num classes.
Use box centers and size but flip x and y co-ordinates.
Use box centers and size.
std::vector< float > variances() const
Get min variances.
Size2D kernel_size
Width and height of the kernel.
Store the tensor's metadata.
bool reshape_b_only_on_first_run() const
Flag which specifies if the reshape of matrix B should executed only for the first.
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
uint16_t x
Top-left x coordinate.
unsigned int m0
Number of rows processed by the matrix multiplication.
ActivationFunction activation() const
Get the type of activation function.
quantized, asymmetric fixed-point 8-bit number signed
64-bit floating-point number
constexpr int end() const
Return the end of the dimension.
MagnitudeType
Magnitude calculation type.
int mult_transpose1xW_width
Multiplication factor for the width of the 1xW transposed block.
uint16_t height
Height of the rectangle.
unsigned int pad_bottom() const
Get the bottom padding.
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
bool clip() const
Get the clip value.
const TensorShape & tensor_shape() const override
Size for each dimension of the tensor.
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
DataType
Available data types.
Truncates the least significant values that are lost in operations.
unsigned int pad_left() const
Get the left padding.
Reshaped GEMM kernel where both lhs and rhs matrices are reshaped.
Searches all possible LWS configurations while tuning.
ElementWiseUnary
Available element wise unary operations.
DataLayout
[DataLayout enum definition]
std::vector< uint32_t > Multiples
Information to produce a tiled version of a Tensor.
constexpr int start() const
Return the start of the dimension.
NormType
The normalization type used for the normalization layer.
MatrixPattern
Available matrix patterns.
Normalization applied cross maps.
Any other matrix pattern.
Describe a multidimensional execution window.
ConvertPolicy
Policy to handle overflow.
int background_label_id() const
Get background label ID.
NonLinearFilterFunction
Available non linear functions.
float confidence_threshold() const
Get confidence threshold.
Normalization applied within the same map in 2D region.
SamplingPolicy
Available Sampling Policies.
std::pair< unsigned int, unsigned int > kernel_size() const
Return the width and height of the kernel.
int num_loc_classes() const
Get number of location classes.
std::string to_string_if_not_null(T *arg)
Formatted output if arg is not null.
Non linear median filter.
std::vector< float > min_sizes() const
Get min sizes.
TracePoint::Args && operator<<(TracePoint::Args &&tp, const ICLTensor *arg)