24.02.1
|
Go to the documentation of this file.
25 #ifndef ACL_UTILS_TYPEPRINTER_H
26 #define ACL_UTILS_TYPEPRINTER_H
28 #ifdef ARM_COMPUTE_OPENCL_ENABLED
108 template <
typename T>
111 const size_t max_print_size = 5
U;
116 for (i = 0; i <
args.size(); ++i)
118 if (i == max_print_size)
146 template <
typename T>
149 std::stringstream
str;
161 template <
typename T>
168 for (
unsigned int d = 1; d < dimensions.num_dimensions(); ++d)
170 os <<
"," << dimensions[d];
186 switch (rounding_policy)
192 os <<
"TO_NEAREST_UP";
195 os <<
"TO_NEAREST_EVEN";
241 std::stringstream
str;
255 os <<
"( m=" << gemm_info.
m;
256 os <<
" n=" << gemm_info.
n;
257 os <<
" k=" << gemm_info.
k;
264 os <<
" a_offset=" << gemm_info.
a_offset;
265 os <<
" b_offset=" << gemm_info.
b_offset;
279 os <<
"( m0=" << (
unsigned int)gemm_info.
m0 <<
" k0=" << gemm_info.
k0 <<
" v0=" << gemm_info.
v0
293 os <<
"( n0=" << (
unsigned int)gemm_info.
n0 <<
" k0=" << gemm_info.
k0 <<
" h0=" << gemm_info.
h0
307 std::stringstream
str;
320 std::stringstream
str;
333 std::stringstream
str;
347 auto weights = bbox_info.
weights();
349 << weights[0] <<
", " << weights[1] <<
", " << weights[2] <<
", " << weights[3] <<
"})";
353 #if defined(ARM_COMPUTE_ENABLE_BF16)
356 return os << float(v);
368 std::stringstream
str;
394 std::stringstream
str;
420 std::stringstream
str;
421 str << proposals_info;
435 os <<
"Scale:" << uqinfo.
scale <<
"~";
436 os <<
"Offset:" << uqinfo.
offset;
448 std::stringstream
str;
449 str << quantization_info;
462 switch (act_function)
464 case ActivationLayerInfo::ActivationFunction::ABS:
467 case ActivationLayerInfo::ActivationFunction::LINEAR:
470 case ActivationLayerInfo::ActivationFunction::LOGISTIC:
473 case ActivationLayerInfo::ActivationFunction::RELU:
476 case ActivationLayerInfo::ActivationFunction::BOUNDED_RELU:
477 os <<
"BOUNDED_RELU";
479 case ActivationLayerInfo::ActivationFunction::LEAKY_RELU:
482 case ActivationLayerInfo::ActivationFunction::SOFT_RELU:
485 case ActivationLayerInfo::ActivationFunction::SQRT:
488 case ActivationLayerInfo::ActivationFunction::LU_BOUNDED_RELU:
489 os <<
"LU_BOUNDED_RELU";
491 case ActivationLayerInfo::ActivationFunction::ELU:
494 case ActivationLayerInfo::ActivationFunction::SQUARE:
497 case ActivationLayerInfo::ActivationFunction::TANH:
500 case ActivationLayerInfo::ActivationFunction::IDENTITY:
503 case ActivationLayerInfo::ActivationFunction::HARD_SWISH:
506 case ActivationLayerInfo::ActivationFunction::SWISH:
509 case ActivationLayerInfo::ActivationFunction::GELU:
528 std::stringstream
str;
549 os <<
info->activation();
551 os <<
"VAL_A=" <<
info->a() <<
",";
552 os <<
"VAL_B=" <<
info->b();
575 std::stringstream
str;
615 std::stringstream
str;
616 str <<
info.type() <<
":NormSize=" <<
info.norm_size();
629 os <<
info.type() <<
":NormSize=" <<
info.norm_size();
669 os <<
info.pool_type;
682 std::stringstream
str;
683 str << rounding_policy;
729 std::stringstream
str;
744 switch (data_layout_dim)
791 os <<
"QASYMM8_SIGNED";
794 os <<
"QSYMM8_PER_CHANNEL";
853 std::stringstream
str;
935 std::stringstream
str;
1002 std::stringstream
str;
1043 os << border.
top <<
"," << border.
right <<
"," << border.
bottom <<
"," << border.
left;
1058 for (
auto const &p : padding)
1060 os <<
"{" << p.first <<
"," << p.second <<
"}";
1076 for (
size_t i = 0; i < multiples.size() - 1; i++)
1078 os << multiples[i] <<
", ";
1080 os << multiples.back() <<
")";
1096 os <<
"NEAREST_NEIGHBOR";
1147 os <<
"Shape=" <<
info->tensor_shape() <<
","
1157 os <<
", QuantizationInfo={"
1158 <<
"scales.size=" << scales.size() <<
", scale(s)=" << scales <<
", ";
1160 os <<
"offsets.size=" << offsets.size() <<
", offset(s)=" << offsets <<
"}";
1186 std::stringstream
str;
1199 std::stringstream
str;
1212 std::string ret_str =
"nullptr";
1213 if (
info !=
nullptr)
1215 std::stringstream
str;
1217 ret_str =
str.str();
1241 std::string ret_str =
"nullptr";
1244 std::stringstream
str;
1246 ret_str =
str.str();
1270 std::stringstream
str;
1275 #ifdef ARM_COMPUTE_OPENCL_ENABLED
1282 inline std::string
to_string(
const ICLTensor *cl_tensor)
1284 std::string ret_str =
"nullptr";
1285 if (cl_tensor !=
nullptr)
1287 std::stringstream
str;
1288 str <<
"ICLTensor->info(): " << cl_tensor->info();
1289 ret_str =
str.str();
1300 inline std::string
to_string(ICLTensor *cl_tensor)
1302 return to_string(
static_cast<const ICLTensor *
>(cl_tensor));
1312 inline ::std::ostream &
operator<<(::std::ostream &os,
const cl::NDRange &nd_range)
1314 os <<
"{" << nd_range[0] <<
"," << nd_range[1] <<
"," << nd_range[2] <<
"}";
1324 inline std::string
to_string(
const cl::NDRange &nd_range)
1326 std::stringstream
str;
1338 template <
typename T>
1341 std::stringstream
str;
1354 std::stringstream
str;
1367 std::stringstream
str;
1380 std::stringstream
str;
1394 os <<
"{m=" <<
info.m() <<
",";
1395 os <<
"n=" <<
info.n() <<
",";
1396 os <<
"k=" <<
info.k() <<
",";
1397 os <<
"mult_transpose1xW_width=" <<
info.mult_transpose1xW_width() <<
",";
1398 os <<
"mult_interleave4x4_height=" <<
info.mult_interleave4x4_height();
1413 os <<
"{is_a_reshaped=" <<
info.is_a_reshaped() <<
",";
1414 os <<
"is_b_reshaped=" <<
info.is_b_reshaped() <<
",";
1415 os <<
"reshape_b_only_on_first_run=" <<
info.reshape_b_only_on_first_run() <<
",";
1416 os <<
"depth_output_gemm3d=" <<
info.depth_output_gemm3d() <<
",";
1417 os <<
"reinterpret_input_as_3d=" <<
info.reinterpret_input_as_3d() <<
",";
1418 os <<
"retain_internal_weights=" <<
info.retain_internal_weights() <<
",";
1419 os <<
"fp_mixed_precision=" <<
info.fp_mixed_precision() <<
",";
1420 os <<
"broadcast_bias=" <<
info.broadcast_bias() <<
",";
1421 os <<
"pretranspose_B=" <<
info.pretranspose_B() <<
",";
1436 os <<
"{start=" << dim.
start() <<
", end=" << dim.
end() <<
", step=" << dim.
step() <<
"}";
1471 std::stringstream
str;
1484 std::stringstream
str;
1497 std::stringstream
str;
1510 std::stringstream
str;
1522 std::stringstream
str;
1535 std::string ret_str =
"nullptr";
1538 std::stringstream
str;
1540 ret_str =
str.str();
1555 os <<
"+" << rect.
x <<
"+" << rect.
y;
1595 std::stringstream
str;
1609 os << pad_stride_info.
stride().first <<
"," << pad_stride_info.
stride().second;
1625 std::stringstream
str;
1626 str << pad_stride_info;
1638 std::stringstream
str;
1651 std::stringstream
str;
1664 std::stringstream
str;
1677 std::stringstream
str;
1690 std::stringstream
str;
1703 std::stringstream
str;
1734 std::stringstream
str;
1766 os <<
"SQUARED_DIFF";
1789 std::stringstream
str;
1815 os <<
"ARG_IDX_MAX";
1818 os <<
"ARG_IDX_MIN";
1844 std::stringstream
str;
1870 os <<
"GreaterEqual";
1918 os <<
"LOGICAL_NOT";
1935 std::stringstream
str;
1948 std::stringstream
str;
1961 std::stringstream
str;
1974 std::stringstream
str;
1987 std::stringstream
str;
1988 str <<
"{Type=" <<
info.pool_type <<
","
1990 <<
"IsGlobalPooling=" <<
info.is_global_pooling;
1991 if (!
info.is_global_pooling)
1994 <<
"PoolSize=" <<
info.pool_size.width <<
"," <<
info.pool_size.height <<
","
1995 <<
"PadStride=" <<
info.pad_stride_info;
2023 std::stringstream
str;
2037 os << padding3d.
left <<
"," << padding3d.
right <<
"," << padding3d.
top <<
"," << padding3d.
bottom <<
","
2038 << padding3d.
front <<
"," << padding3d.
back;
2050 std::stringstream
str;
2064 switch (rounding_type)
2087 os <<
"{Type=" <<
info.pool_type <<
","
2088 <<
"IsGlobalPooling=" <<
info.is_global_pooling;
2089 if (!
info.is_global_pooling)
2092 <<
"PoolSize=" <<
info.pool_size <<
", "
2093 <<
"Stride=" <<
info.stride <<
", "
2094 <<
"Padding=" <<
info.padding <<
", "
2095 <<
"Exclude Padding=" <<
info.exclude_padding <<
", "
2096 <<
"fp_mixed_precision=" <<
info.fp_mixed_precision <<
", "
2097 <<
"DimensionRoundingType=" <<
info.round_type;
2111 std::stringstream
str;
2124 std::stringstream
str;
2126 str <<
"Clip:" <<
info.clip() <<
"Flip:" <<
info.flip() <<
"StepX:" <<
info.steps()[0]
2127 <<
"StepY:" <<
info.steps()[1] <<
"MinSizes:" <<
info.min_sizes().size()
2128 <<
"MaxSizes:" <<
info.max_sizes().size() <<
"ImgSizeX:" <<
info.img_size().x
2129 <<
"ImgSizeY:" <<
info.img_size().y <<
"Offset:" <<
info.offset() <<
"Variances:" <<
info.variances().size();
2156 std::stringstream
str;
2170 switch (conv_method)
2185 os <<
"GEMM_CONV2D";
2202 std::stringstream
str;
2219 os <<
"GPU_ARCH_MASK";
2222 os <<
"GPU_GENERATION_MASK";
2326 std::stringstream
str;
2340 os <<
"{x=" << detection_window.
x <<
","
2341 <<
"y=" << detection_window.
y <<
","
2342 <<
"width=" << detection_window.
width <<
","
2343 <<
"height=" << detection_window.
height <<
","
2344 <<
"idx_class=" << detection_window.
idx_class <<
","
2345 <<
"score=" << detection_window.
score <<
"}";
2359 switch (detection_code)
2362 os <<
"CENTER_SIZE";
2368 os <<
"CORNER_SIZE";
2387 std::stringstream
str;
2388 str << detection_code;
2401 os <<
"{Classes=" << detection_info.
num_classes() <<
","
2403 <<
"CodeType=" << detection_info.
code_type() <<
","
2405 <<
"KeepTopK=" << detection_info.
keep_top_k() <<
","
2407 <<
"Eta=" << detection_info.
eta() <<
","
2410 <<
"TopK=" << detection_info.
top_k() <<
","
2424 std::stringstream
str;
2425 str << detection_info;
2437 os <<
"{MaxDetections=" << detection_info.
max_detections() <<
","
2440 <<
"NmsIouThreshold=" << detection_info.
iou_threshold() <<
","
2441 <<
"NumClasses=" << detection_info.
num_classes() <<
","
2460 std::stringstream
str;
2461 str << detection_info;
2473 std::stringstream
str;
2474 str << detection_window;
2487 os <<
"Clip:" <<
info.clip() <<
"Flip:" <<
info.flip() <<
"StepX:" <<
info.steps()[0] <<
"StepY:" <<
info.steps()[1]
2488 <<
"MinSizes:" <<
info.min_sizes() <<
"MaxSizes:" <<
info.max_sizes() <<
"ImgSizeX:" <<
info.img_size().x
2489 <<
"ImgSizeY:" <<
info.img_size().y <<
"Offset:" <<
info.offset() <<
"Variances:" <<
info.variances();
2497 os <<
"{OutputTileSize=" <<
info.output_tile_size <<
","
2498 <<
"KernelSize=" <<
info.kernel_size <<
","
2499 <<
"PadStride=" <<
info.convolution_info <<
","
2500 <<
"OutputDataLayout=" <<
info.output_data_layout <<
"}";
2507 std::stringstream
str;
2524 return std::string(
"Exhaustive");
2528 return std::string(
"Normal");
2532 return std::string(
"Rapid");
2537 return std::string(
"UNDEFINED");
2557 return "Reshaped_Only_RHS";
2592 os <<
"{PadStrideInfo=" <<
conv_info.pad_stride_info <<
", "
2593 <<
"depth_multiplier=" <<
conv_info.depth_multiplier <<
", "
2595 <<
"dilation=" <<
conv_info.dilation <<
"}";
2607 std::stringstream
str;
2638 std::stringstream
str;
2658 os <<
"QUANTIZE_DOWN";
2661 os <<
"QUANTIZE_DOWN_FIXEDPOINT";
2664 os <<
"QUANTIZE_DOWN_FLOAT";
2680 std::stringstream
str;
2694 os <<
"{type=" << gemm_info.
type <<
", "
2716 std::stringstream
str;
2730 os <<
"{conv_info=" <<
conv_info.conv_info <<
", "
2731 <<
"dilation=" <<
conv_info.dilation <<
", "
2733 <<
"enable_fast_math=" <<
conv_info.enable_fast_math <<
", "
2734 <<
"num_groups=" <<
conv_info.num_groups <<
","
2747 std::stringstream
str;
2761 os <<
"{value.u64=" << pixel_value.
get<uint64_t>() <<
"}";
2773 std::stringstream
str;
2788 <<
"BorderMode=" << scale_info.
border_mode <<
", "
2791 <<
"use_padding=" << scale_info.
use_padding <<
", "
2793 <<
"data_layout=" << scale_info.
data_layout <<
"}";
2805 std::stringstream
str;
2841 std::stringstream
str;
2842 str <<
"{" << fft_dir <<
"}";
2855 os <<
"{axis=" << fft1d_info.
axis <<
", "
2856 <<
"direction=" << fft1d_info.
direction <<
"}";
2868 std::stringstream
str;
2882 os <<
"{axis=" << fft2d_info.
axis0 <<
", "
2883 <<
"axis=" << fft2d_info.
axis1 <<
", "
2884 <<
"direction=" << fft2d_info.
direction <<
"}";
2896 std::stringstream
str;
2910 os <<
"{x=" << coord_2d.
x <<
", "
2911 <<
"y=" << coord_2d.
y <<
"}";
2923 std::stringstream
str;
2940 os <<
"CONVOLUTION";
2943 os <<
"DEPTHWISECONVOLUTION";
2959 std::stringstream
str;
2973 os <<
"{beta=" <<
info.beta <<
", "
2974 <<
"is_log=" <<
info.is_log <<
", "
2975 <<
"input_data_type=" <<
info.input_data_type <<
", "
2976 <<
"axis=" <<
info.axis <<
"}";
2988 std::stringstream
str;
3000 template <
typename T>
3015 <<
"cell_clip=" << lstm_params.
cell_clip() <<
", "
3024 <<
"has_cifg_opt=" << lstm_params.
has_cifg_opt() <<
", "
3035 template <
typename T>
3038 std::stringstream
str;
3090 std::stringstream
str;
3104 os <<
"{score_thresh=" <<
info.score_thresh() <<
", "
3105 <<
"nms=" <<
info.nms() <<
", "
3106 <<
"detections_per_im=" <<
info.detections_per_im() <<
", "
3107 <<
"soft_nms_enabled=" <<
info.soft_nms_enabled() <<
", "
3108 <<
"soft_nms_min_score_thres=" <<
info.soft_nms_min_score_thres() <<
", "
3109 <<
"suppress_size=" <<
info.suppress_size() <<
", "
3110 <<
"min_size=" <<
info.min_size() <<
", "
3111 <<
"im_width=" <<
info.im_width() <<
", "
3112 <<
"im_height=" <<
info.im_height() <<
"}";
3124 std::stringstream
str;
3137 std::stringstream
str;
3138 str << rounding_type;
3151 os << conv3d_info.
stride;
3174 std::stringstream
str;
3187 #define __CASE_WEIGHT_FORMAT(wf) \
3188 case WeightFormat::wf: \
3229 return "invalid value";
3231 #undef __CASE_WEIGHT_FORMAT
3253 inline std::string
to_string(
const std::tuple<TensorShape, TensorShape, arm_compute::WeightFormat> values)
3255 std::stringstream
str;
3256 str <<
"[Input shape = " << std::get<0>(values);
3258 str <<
"Expected output shape = " << std::get<1>(values);
3261 str <<
"WeightFormat = " << std::get<2>(values) <<
"]";
3274 os << padding2d.
left <<
"," << padding2d.
right <<
"," << padding2d.
top <<
"," << padding2d.
bottom;
3286 std::stringstream
str;
3300 os <<
"Pool2dAttributes="
3302 <<
"PoolingType=" << pool2d_attr.
pool_type() <<
","
3303 <<
"PoolSize=" << pool2d_attr.
pool_size() <<
","
3304 <<
"Padding=" << pool2d_attr.
pad() <<
","
3305 <<
"Stride=" << pool2d_attr.
stride() <<
","
3319 std::stringstream
str;
3345 std::stringstream
str;
3359 os <<
"Conv2dAttributes="
3361 <<
"Padding=" << conv2d_attr.
pad() <<
", "
3362 <<
"Size2D=" << conv2d_attr.
stride() <<
", "
3363 <<
"Dialation=" << conv2d_attr.
dilation() <<
"]";
3376 std::stringstream
str;
3390 os <<
"CastAttributes="
3392 <<
"Data Type=" << cast_attr.
data_type() <<
", "
3405 std::stringstream
str;
3420 os <<
"DepthwiseConv2dAttributes="
3422 <<
"Padding=" << dw_conv2d_attr.
pad() <<
", "
3423 <<
"Size2D=" << dw_conv2d_attr.
stride() <<
", "
3425 <<
"Dilation=" << dw_conv2d_attr.
dilation() <<
","
3438 std::stringstream
str;
3439 str << dw_conv2d_attr;
3452 os <<
"ClampAttributes="
3454 <<
"Min value=" << clamp_attr.
min_val() <<
", "
3455 <<
"Max value=" << clamp_attr.
max_val() <<
"]";
3466 std::stringstream
str;
3480 os <<
"ResizeAttributes="
3485 <<
"OutputWidth=" << resize_attr.
output_width() <<
", "
3498 std::stringstream
str;
3513 os <<
"SoftmaxAttributes="
3515 <<
"Beta=" << softmax_attr.
beta() <<
", "
3517 <<
"Axis=" << softmax_attr.
axis() <<
"]";
3528 std::stringstream
str;
3529 str << softmax_attr;
3541 os <<
"MatMulKernelInfo="
3543 <<
"adj_lhs=" << matmul_info.
adj_lhs() <<
", "
3544 <<
"adj_rhs=" << matmul_info.
adj_rhs() <<
"] ";
3555 std::stringstream
str;
3569 os <<
"MatMulKernelInfo="
3571 <<
"adj_lhs=" << matmul_info.
adj_lhs <<
", "
3572 <<
"adj_rhs=" << matmul_info.
adj_rhs <<
", "
3573 <<
"M0=" << matmul_info.
m0 <<
", "
3574 <<
"N0=" << matmul_info.
n0 <<
", "
3575 <<
"K0=" << matmul_info.
k0 <<
", "
3588 std::stringstream
str;
3602 os <<
"CpuMatMulSettings="
3604 <<
"fast_math=" << settings.
fast_math() <<
"]";
3616 std::stringstream
str;
3623 #endif // ACL_UTILS_TYPEPRINTER_H
@ NCHW
Num samples, channels, height, width.
std::string to_string(T &&value)
Convert integer and float values to string.
@ QSYMM8_PER_CHANNEL
quantized, symmetric per channel fixed-point 8-bit number
unsigned int right
right of the border
Descriptor used by the softmax kernels.
@ LessEqual
Less equal comparison ( )
@ QASYMM16
quantized, asymmetric fixed-point 16-bit number
@ CONSTANT
Pixels outside the image are assumed to have a constant value.
uint16_t x
Top-left x coordinate.
bool reinterpret_input_as_3d
Flag used to reinterpret the input as 3D.
unsigned int m
Number of LHS rows.
bool variance_encoded_in_target() const
Get if variance encoded in target.
float feat_height() const
@ RGB888
3 channels, 1 U8 per channel
Conv2dAttributes & pad(const Padding2D &pad)
Set padding.
CastAttributes & convert_policy(const ConvertPolicy &policy)
Set Policy.
@ U64
unsigned 64-bit number
bool use_inf_as_limit() const
constexpr int start() const
Return the start of the dimension.
std::string to_string_if_not_null(T *arg)
Formatted output if arg is not null.
Operator backend specific settings.
Convolution Layer Weights Information class.
@ FFT
Convolution using FFT.
@ UNKNOWN
Unknown image format.
decltype(strategy::transforms) typedef type
@ BFLOAT16
16-bit brain floating-point number
bool share_location() const
Get share location.
int32_t a_offset
Offset to be added to each element of the matrix A.
int num_classes() const
Get num classes.
@ TO_NEAREST_EVEN
Rounds to nearest value; half rounds to nearest even.
Quantization information.
Class describing the value of a pixel for any image format.
float forget_intermediate_scale() const
unsigned int pooled_width() const
Get the pooled width of the layer.
std::vector< PaddingInfo > PaddingList
List of padding information.
int keep_top_k() const
Get the number of total bounding boxes to be kept per image.
unsigned int n0
Number of columns processed by the matrix multiplication.
ResizeAttributes & output_width(int32_t output_width)
Set output width.
DataLayout
[DataLayout enum definition]
int32_t gemmlowp_multiplier
GEMMLowp output stage multiplier used for quantizing to QASYMM8.
@ F64
64-bit floating-point number
@ Equal
Equal comparison ( )
unsigned int pad_right() const
Get the right padding.
@ QUANTIZE_DOWN_FLOAT
Quantize using a floating point multiplication.
size_t bottom
Padding across the height dimension on the bottom, in elements.
GEMMLowp output stage info.
Container for 2D border size.
@ IN_MAP_1D
Normalization applied within the same map in 1D region.
@ NCDHW
Num samples, channels, depth, height, width.
GEMM reshape information class.
@ NHWC
Num samples, height, width, channels.
@ UNDEFINED
Borders are left undefined.
DataLayoutDimension
[DataLayout enum definition]
int32_t gemmlowp_offset
GEMMLowp output stage offset used for quantizing to QASYMM8.
float nms_score_threshold() const
Get nms threshold.
@ TOP_LEFT
Samples are taken at pixel top left corner.
@ AREA
Output values are determined by averaging the source pixels whose areas fall under the area of the de...
SamplingPolicy
Available Sampling Policies.
DetectionOutputLayerCodeType
Available Detection Output code types.
unsigned int max_detections() const
Get max detections.
constexpr int step() const
Return the step of the dimension.
@ QASYMM8
quantized, asymmetric fixed-point 8-bit number unsigned
void get(uint8_t &v) const
Interpret the pixel value as a U8.
@ U16
unsigned 16-bit number
@ Greater
Greater comparison ( )
float iou_threshold() const
Get intersection over union threshold.
@ CORNER_SIZE
Use box centers and size.
Padding information for 3D operations like Conv3d.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
@ PRELU
y*x if x < 0, x otherwise
GEMMLowpOutputStageType type
GEMMLowp output stage type.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
@ QSYMM8
quantized, symmetric fixed-point 8-bit number
SoftmaxAttributes & axis(int axis)
Set axis.
bool fp_mixed_precision
Flag used to indicate wider accumulators (32 bit instead of 16 for FP16).
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.
bool adj_rhs
Get Adjoint RHS flag value.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
float score
Confidence value for the detection window.
Class for specifying the size of an image or rectangle.
InterpolationPolicy
Interpolation method.
T * cell_to_input_weights() const
unsigned int top
top of the border
bool is_quantized_per_channel
GEMMLowp quantized per-channel flag.
float scale_value_x() const
Get x scale value.
size_t height
Height of the image region or rectangle.
Interface for CPU tensor.
T * cell_layer_norm_weights() const
SoftmaxAttributes & beta(float beta)
Set beta.
BoxWithNonMaximaSuppressionLimit Information class.
@ NATIVE
Native GEMM kernel with configurable block size.
DimensionRoundingType
Dimension rounding type when down-scaling on CNNs.
Detection window used for the object detection.
size_t width
Width of the 3D shape or object.
const std::string & string_from_data_type(DataType dt)
Convert a data type identity into a string.
T * output_layer_norm_weights() const
size_t top
Padding across the height dimension on the top, in elements.
unsigned int v0
Number of vertical blocks of size (m0xk0) stored on the same output row.
unsigned int pooled_height() const
Get the pooled height of the layer.
Descriptor used by the GEMM kernels.
float scale_value_y() const
Get y scale value.
ReductionOperation
Available reduction operations.
int m0
Number of output rows processed by each work-item.
ActivationLayerInfo act_info
ActivationLayerInfo activation_info
Fused activation to apply after the matrix multiplication.
@ RSQRT
Reverse square root.
ComputeAnchors information class.
PaddingMode
Padding mode to use for PadLayer.
bool use_padding
Indication of using padding.
constexpr auto data_layout
@ QSYMM16
quantized, symmetric fixed-point 16-bit number
@ UV88
2 channel, 1 U8 per channel
Descriptor used by the 2d Convolution function.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
int32_t gemmlowp_max_bound
GEMMLowp max value used to saturate down the output result before converting back to QASYMM8.
FuseBatchNormalizationType
Available FuseBatchNormalizationType.
ClampAttributes & max_val(const float &max_val)
Set the maximum clip value.
@ EXHAUSTIVE
Searches all possible LWS configurations while tuning.
CLGEMMKernelType
OpenCL GEMM kernel types.
ConvolutionMethod
Available ConvolutionMethod.
DataLayout data_layout
Data layout to use.
Activation Layer Information class.
@ QUANTIZE_DOWN
Quantize using an integer multiplication.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
Strides of an item in bytes.
@ NORMAL
Searches a subset of LWS configurations while tuning.
@ TO_NEAREST_UP
Rounds to nearest value; half rounds away from zero.
float input_intermediate_scale() const
Fully connected layer info.
Conv2dAttributes & stride(const Size2D &stride)
Set stride.
size_t right
Padding across the width dimension on the right, in elements.
FFTDirection direction
Direction of the FFT.
int k0
Number of inner accumulations.
size_t height
Height of the 3D shape or object.
unsigned int bottom
bottom of the border
float gemmlowp_real_multiplier
GEMMLowp output stage real multiplier used for quantizing to QASYMM8.
@ Less
Less comparison ( )
RoundingPolicy
Rounding method.
WeightFormat
Memory layouts for the weights tensor.
T * cell_to_output_weights() const
DepthwiseConv2dAttributes & dimension_rounding_type(const DimensionRoundingType &dimension_rounding_type)
Set Dimension rounding type.
@ U32
unsigned 32-bit number
BorderMode border_mode
Border mode policy.
float projection_clip() const
unsigned int n
Number of RHS columns.
unsigned int max_classes_per_detection() const
Get max_classes per detection.
float confidence_threshold() const
Get confidence threshold.
size_t depth
Depth of the 3D shape or object.
size_t width
Width of the image region or rectangle.
PoolingType pool_type() const
size_t left
Padding across the width dimension on the left, in elements.
size_t top
Padding across the height dimenstion on the top, in elements.
ComparisonOperation
Supported comparison operations.
ResizeAttributes & output_height(int32_t output_height)
Set output height.
float scale_value_w() const
Get w scale value.
const T * projection_weights() const
@ SUM_SQUARE
Sum of squares.
@ TF_CENTER
Use box centers and size but flip x and y co-ordinates.
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
uint16_t width
Width of the detection window.
uint16_t height
Height of the rectangle.
bool are_weights_reshaped
unsigned int m0
Number of rows processed by the matrix multiplication.
FFTDirection
FFT direction to use.
@ U8
unsigned 8-bit number
#define __CASE_WEIGHT_FORMAT(wf)
GEMMType gemm_type(TokenStream &in, bool &valid)
@ S16
signed 16-bit number
ActivationFunction
Available activation functions.
uint16_t x
Top-left x coordinate.
Pooling Layer Information struct.
std::string to_string(const arm_compute::CpuMatMulSettings &settings)
Formatted output of the arm_compute::CpuMatMulSettings type.
const std::vector< float > & scale() const
Scale vector accessor.
@ CONVOLUTION
For Convolution weights.
@ QASYMM8_SIGNED
quantized, asymmetric fixed-point 8-bit number signed
bool align_corners
Align corners of input and output.
@ C1
Second channel (used by formats with unknown channel types).
@ REPLICATE
Pixels outside the image are assumed to have the same value as the closest image pixel.
unsigned int axis0
Axis to run first pass on.
@ NotEqual
NotEqual comparison ( )
Detection Output layer info.
arm_compute::bfloat16 bfloat16
int background_label_id() const
Get background label ID.
@ WINOGRAD
Convolution using Winograd.
bool use_layer_norm() const
@ RAPID
Searches a minimal subset of LWS configurations while tuning.
NMSType
Available non maxima suppression types.
PoolingType
Available pooling types.
bool broadcast_bias
Flag used to broadcast the bias addition.
int top_k() const
Get top K.
@ GEMM_CONV2D
Direct 2D GEMM convolution.
@ IYUV
A 3 plane of 8-bit 4:2:0 sampled Y, U, V planes.
uint16_t idx_class
Index of the class.
@ RGBA8888
4 channels, 1 U8 per channel
@ DEPTHWISECONVOLUTION
For Depthwise Convolution weights.
size_t back
Padding across the depth dimenstion on the back, in elements.
size_t front
Padding across the depth dimenstion on the front, in elements.
@ GEMM
Convolution using GEMM.
UniformQuantizationInfo uniform() const
Return per layer quantization info.
unsigned int axis
Axis to run the FFT on.
@ ARG_IDX_MAX
Index of the max value.
@ C0
Unknown channel format.
@ IN_MAP_2D
Normalization applied within the same map in 2D region.
@ C2
Third channel (used by formats with unknown channel types).
bool has_peephole_opt() const
bool fp_mixed_precision
Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy.
CLTensor * tensor
Pointer to the auxiliary tensor.
Describe one of the image's dimensions with a start, end and step.
SoftmaxAttributes & is_log_softmax(bool is_log)
Set is_log.
bool exclude_padding() const
float eta() const
Get eta.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
int mult_transpose1xW_width
Multiplication factor for the width of the 1xW transposed block.
bool has_cifg_opt() const
Descriptor used by the FFT2D function.
Detection Output layer info.
Descriptor used by the FFT1D function.
unsigned int k
Number of LHS columns or RHS rows.
@ U8
1 channel, 1 U8 per channel
@ DIRECT
Direct convolution.
@ BILINEAR
Output values are defined by bilinear interpolation between the pixels.
Format
Image colour formats.
const T * recurrent_to_input_weights() const
Channel
Available channels.
GEMMLowpOutputStageType
GEMMLowp output stage type.
Class for specifying the size of a 3D shape or object.
int32_t hidden_state_zero() const
@ S32
1 channel, 1 S32 per channel
Pooling Layer Information struct.
int mult_interleave4x4_height
Multiplication factor for the height of the 4x4 interleaved block.
bool interleave
True if the h0 (k0xn0) blocks have to be interleaved in the output row.
@ YUYV422
A single plane of 32-bit macro pixel of Y0, U0, Y1, V0 bytes.
unsigned int pad_left() const
Get the left padding.
const std::string & string_from_data_layout(DataLayout dl)
Convert a data layout identity into a string.
uint16_t height
Height of the detection window.
GPUTarget
Available GPU Targets.
float nms_threshold() const
Get nms threshold.
bool adj_lhs
Get Adjoint LHS flag value.
@ YUV444
A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
@ UYVY422
A single plane of 32-bit macro pixel of U0, Y0, V0, Y1 byte.
size_t left
Padding across the width dimenstion on the left, in elements.
GEMM LHS (Left Hand Side) matrix information.
Store the tensor's metadata.
T * input_layer_norm_weights() const
Conv2dAttributes & dilation(const Size2D &dilation)
Set dilation.
@ ARG_IDX_MIN
Index of the min value.
ResizeAttributes & align_corners(bool align_corners)
Set align corners.
DataLayout weights_trained_layout
Layout that the weights have been trained with.
PixelValue constant_border_value
Constant value to use for constant border mode policy.
@ F32
1 channel, 1 F32 per channel
unsigned int pad_bottom() const
Get the bottom padding.
float scale_value_h() const
Get h scale value.
Describe a multidimensional execution window.
bool use_regular_nms() const
Get if use regular nms.
Normalization Layer Information class.
FFTDirection direction
Direction of the FFT.
bool transpose
True if the (k0xn0) block has to be transposed before been stored.
@ S64
signed 64-bit number
int num_loc_classes() const
Get number of location classes.
DepthwiseConv2dAttributes & depth_multiplier(const uint32_t &depth_multiplier)
Set depth multiplier.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
DetectionOutputLayerCodeType code_type() const
Get detection output code type.
ResizeAttributes & interpolation_policy(InterpolationPolicy interpolation_policy)
Set interpolation policy.
Settings for MatMul Cpu implementation.
Copyright (c) 2017-2024 Arm Limited.
@ NV12
A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
std::string to_string(const ClComponentElementwiseBinary::Attributes::ElementwiseOp &op)
Formatted output of the arm_compute::experimental::dynamic_fusion::ClComponentElementwiseBinary::Attr...
T * forget_layer_norm_weights() const
DataType output_data_type
Output tensor data type to use if the output is not initialized.
ConvertPolicy
Policy to handle integer overflow.
@ TO_ZERO
Truncates the least significant values that are lost in operations.
@ F16
16-bit floating-point number
unsigned int left
left of the border
Descriptor used by the 3d Convolution function.
std::vector< uint32_t > Multiples
Information to produce a tiled version of a Tensor.
@ CROSS_MAP
Normalization applied cross maps.
bool transpose
True if the (m0xk0) block has to be transposed before been stored.
bool has_projection() const
float hidden_state_scale() const
bool export_rhs_to_cl_image
Flag to know whether the RHS tensor should be exported to cl_image.
@ S32
signed 32-bit number
float spatial_scale() const
Get the spatial scale.
@ GreaterEqual
Greater equal comparison ( )
CLTunerMode
< OpenCL tuner modes
T * cell_to_forget_weights() const
unsigned int num_classes() const
Get num classes.
uint16_t y
Top-left y coordinate.
ClampAttributes & min_val(const float &min_val)
Set the minimum clip value.
@ RESHAPED
Reshaped GEMM kernel where both lhs and rhs matrices are reshaped.
DepthwiseConv2dAttributes & pad(const Padding2D &pad)
Set padding.
int32_t gemmlowp_shift
GEMMLowp output stage shift used for quantizing to uint8.
size_t right
Padding across the width dimenstion on the right, in elements.
@ NEAREST_NEIGHBOR
Output values are defined to match the source pixel whose center is nearest to the sample position.
@ F16
1 channel, 1 F16 per channel
@ CENTER
Samples are taken at pixel center.
BorderMode
Methods available to handle borders.
TensorInfo * info() const override
Interface to be implemented by the child class to return the tensor's metadata.
bool is_data_type_quantized(DataType dt)
Check if a given data type is of quantized type.
int32_t gemmlowp_min_bound
GEMMLowp min value used to saturate down the output result before converting back to QASYMM8.
size_t bottom
Padding across the height dimenstion on the bottom, in elements.
@ UNKNOWN
Unknown data layout.
bool retain_internal_weights
Retain internal reshaped weights.
@ S16
1 channel, 1 S16 per channel
Store the tensor's metadata.
Attributes are backend-agnostic parameters (in addition to the input/output tensors) of an operator.
@ CENTER_SIZE
Use box centers and size.
bool transpose_weights
Transpose weights if true.
@ F32
32-bit floating-point number
NormType
The normalization type used for the normalization layer.
unsigned int k0
Number of partial accumulations performed by the matrix multiplication.
Padding and stride information class.
unsigned int axis1
Axis to run second pass on.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
unsigned int depth_output_gemm3d
Depth of the output tensor in case is reinterpreted as 3D.
@ RESHAPED_ONLY_RHS
Reshaped GEMM kernel where only the rhs matrix is reshaped.
@ UNKNOWN
Unknown data type.
Dimensions with dimensionality.
@ C3
Fourth channel (used by formats with unknown channel types).
float cell_intermediate_scale() const
constexpr int end() const
Return the end of the dimension.
SamplingPolicy sampling_policy
Sampling policy used by the interpolation.
GEMM RHS (Right Hand Side) matrix information.
DepthwiseConv2dAttributes & dilation(const Size2D &dilation)
Set dilation.
const T * projection_bias() const
int n0
Number of output columns processed by each work-item.
unsigned int detection_per_class() const
Get detection per class.
@ QUANTIZE_DOWN_FIXEDPOINT
Quantize using a fixed point multiplication.
unsigned int num_dimensions() const
Returns the effective dimensionality of the tensor.
uint16_t width
Width of the rectangle.
unsigned int h0
Number of horizontal blocks of size (k0xn0) stored on the same output row.
const T * input_to_input_weights() const
InterpolationPolicy interpolation_policy
Interpolation type to use.
DataType
Available data types.
ROI Pooling Layer Information class.
uint16_t y
Top-left y coordinate.
@ NV21
A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
@ LOGICAL_NOT
Logical Not.
Class for holding information related to matrix multiplication function.
Generate Proposals Information class.
float spatial_scale() const
static constexpr size_t num_max_dimensions
Number of dimensions the tensor has.
ElementWiseUnary
Available element wise unary operations.
const QuantizationInfo qinfo
unsigned int pad_top() const
Get the top padding.
const std::vector< int32_t > & offset() const
Offset vector accessor.
std::pair< unsigned int, unsigned int > stride() const
Get the stride.
@ NDHWC
Num samples, depth, height, width, channels.
@ U32
1 channel, 1 U32 per channel
DimensionRoundingType round_type
int32_t b_offset
Offset to be added to each element of the matrix B.
CastAttributes & data_type(const DataType &data_type)
Set Data Type to be casted to.
ResizeAttributes & sampling_policy(SamplingPolicy sampling_policy)
Set sampling policy.
@ U16
1 channel, 1 U16 per channel
const T * input_gate_bias() const
DepthwiseConv2dAttributes & stride(const Size2D &stride)
Set stride.
inline ::std::ostream & operator<<(::std::ostream &os, const ClComponentElementwiseBinary::Attributes::ElementwiseOp &op)
Formatted output of the pute::experimental::dynamic_fusion::ClComponentElementwiseBinary::Attributes:...
ArithmeticOperation
Available element-wise operations.