23.08
|
GEMM information class. More...
#include <GEMMInfo.h>
Public Member Functions | |
GEMMInfo () noexcept | |
Default constructor. More... | |
GEMMInfo (bool is_a_reshaped, bool is_b_reshaped, bool reshape_b_only_on_first_run, int depth_output_gemm3d=0, bool reinterpret_input_as_3d=false, bool retain_internal_weights=false, GEMMLowpOutputStageInfo gemmlowp_output_stage=GEMMLowpOutputStageInfo(), bool fp_mixed_precision=false, bool fast_math=false, bool broadcast_bias=false, const ActivationLayerInfo &activation_info=ActivationLayerInfo(), const experimental::PostOpList< ITensorInfo * > &post_ops=experimental::PostOpList< ITensorInfo * >(), bool fixed_format=false, arm_compute::WeightFormat weight_format=arm_compute::WeightFormat::UNSPECIFIED) noexcept | |
Constructor. More... | |
bool | is_a_reshaped () const |
Flag which specifies if the matrix A has been reshaped. More... | |
bool | is_b_reshaped () const |
Flag which specifies if the matrix B has been reshaped. More... | |
bool | reshape_b_only_on_first_run () const |
Flag which specifies if the reshape of matrix B should executed only for the first. More... | |
int | depth_output_gemm3d () const |
Depth of the output when GEMM output is reinterpreted as 3D tensor. More... | |
bool | reinterpret_input_as_3d () const |
Flag which specifies if the input tensor has to be reinterpreted as 3D. More... | |
bool | retain_internal_weights () const |
Flag which specifies if the weights tensor has to be retained from previous run. More... | |
GEMMLowpOutputStageInfo | gemmlowp_output_stage () const |
GEMMLowp output stage. More... | |
void | set_gemmlowp_output_stage (GEMMLowpOutputStageInfo &output_stage) |
Sets GEMMLowp output stage. More... | |
bool | fp_mixed_precision () const |
Flag which specifies if a wider accumulator should be used. More... | |
bool | fast_math () const |
Flag which specifies if a shorter accumulator to be used. More... | |
void | set_fast_math (bool fast_math) |
Set fast math flag. More... | |
bool | broadcast_bias () const |
Flag which specifies whether to broadcast the shape of the bias tensor. More... | |
bool | pretranspose_A () const |
Flag which specifies whether A should be pre-transposed if supported. More... | |
void | set_pretranspose_A (bool flag) |
Set pre-transpose A flag. More... | |
bool | pretranspose_B () const |
Flag which specifies whether b should be pre-transposed if supported. More... | |
void | set_pretranspose_B (bool flag) |
Set pre-transpose b flag. More... | |
ActivationLayerInfo | activation_info () const |
Activation layer to apply after the matrix multiplication. More... | |
void | set_activation_info (const ActivationLayerInfo &activation_info) |
Set activation layer info. More... | |
const experimental::PostOpList< ITensorInfo * > & | post_ops () const |
Post operations to apply after the matrix multiplication. More... | |
void | set_post_ops (const experimental::PostOpList< ITensorInfo * > &post_ops) |
Set post ops. More... | |
bool | fixed_format () const |
Flag which specifies if the GEMM operation is running fixed-format kernels. More... | |
void | set_fixed_format (bool fixed_format) |
Set fixed-format flag. More... | |
arm_compute::WeightFormat | weight_format () const |
void | set_weight_format (arm_compute::WeightFormat weight_format) |
Set weight format to be used. More... | |
GEMM information class.
This class stores the necessary information to compute GEMM functions
This object also contains the information about how matrix A and matrix B have been reshaped
Definition at line 64 of file GEMMInfo.h.
|
inlinenoexcept |
|
inlinenoexcept |
Constructor.
[in] | is_a_reshaped | True if the matrix A has been reshaped |
[in] | is_b_reshaped | True if the matrix B has been reshaped |
[in] | reshape_b_only_on_first_run | Reshape matrix B only for the first run |
[in] | depth_output_gemm3d | (Optional) Depth (third dimension) of the output tensor to be used with the GEMM3D kernel If 0 the output will not be reinterpreted as 3D. Default 0 |
[in] | reinterpret_input_as_3d | (Optional) Reinterpret the input as 3D tensor. (i.e. this flag should be set to true when GEMM is used to perform 1x1 convolutions with the NHWC data layout) |
[in] | retain_internal_weights | (Optional) Retain the weights tensor from previous run |
[in] | gemmlowp_output_stage | (Optional) GEMMLowp Output stage info |
[in] | fp_mixed_precision | (Optional) Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy. |
[in] | fast_math | (Optional) Use a data type of shorter width to improve performance |
[in] | broadcast_bias | (Optional) Broadcast the shape of the bias tensor from a vector to a matrix. |
[in] | activation_info | (Optional) Activation to apply after the matrix multiplication |
[in] | post_ops | (Optional) A sequence of post operations that are performed after the main operation. |
[in] | fixed_format | (Optional) Specify the selection of fixed format kernels for variable weights support in GEMM. These kernels expect the weights tensor to be in amemory format that is fixed by the kernel itself. For more information, see arm_compute::WeightFormat. |
[in] | weight_format | (Optional) arm_gemm:WeightFormat enumeration requested by the user. Default is arm_compute::WeightFormat::UNSPECIFIED. |
Definition at line 106 of file GEMMInfo.h.
|
inline |
Activation layer to apply after the matrix multiplication.
Definition at line 262 of file GEMMInfo.h.
Referenced by GEMMInfo::set_activation_info().
|
inline |
Flag which specifies whether to broadcast the shape of the bias tensor.
Definition at line 222 of file GEMMInfo.h.
|
inline |
Depth of the output when GEMM output is reinterpreted as 3D tensor.
Definition at line 158 of file GEMMInfo.h.
|
inline |
Flag which specifies if a shorter accumulator to be used.
Definition at line 206 of file GEMMInfo.h.
Referenced by GEMMInfo::set_fast_math().
|
inline |
Flag which specifies if the GEMM operation is running fixed-format kernels.
Definition at line 294 of file GEMMInfo.h.
Referenced by GEMMInfo::set_fixed_format().
|
inline |
Flag which specifies if a wider accumulator should be used.
Definition at line 198 of file GEMMInfo.h.
|
inline |
GEMMLowp output stage.
Definition at line 182 of file GEMMInfo.h.
Referenced by ClGemmLowpMatrixMultiplyCore::prepare(), and CpuGemmLowpMatrixMultiplyCore::run().
|
inline |
Flag which specifies if the matrix A has been reshaped.
Definition at line 132 of file GEMMInfo.h.
|
inline |
Flag which specifies if the matrix B has been reshaped.
Definition at line 140 of file GEMMInfo.h.
|
inline |
Post operations to apply after the matrix multiplication.
Definition at line 278 of file GEMMInfo.h.
Referenced by GEMMInfo::set_post_ops().
|
inline |
Flag which specifies whether A should be pre-transposed if supported.
Definition at line 230 of file GEMMInfo.h.
|
inline |
Flag which specifies whether b should be pre-transposed if supported.
Definition at line 246 of file GEMMInfo.h.
|
inline |
Flag which specifies if the input tensor has to be reinterpreted as 3D.
Definition at line 166 of file GEMMInfo.h.
|
inline |
Flag which specifies if the reshape of matrix B should executed only for the first.
Definition at line 150 of file GEMMInfo.h.
|
inline |
Flag which specifies if the weights tensor has to be retained from previous run.
Definition at line 174 of file GEMMInfo.h.
|
inline |
Set activation layer info.
[in] | activation_info | ActivationLayerInfo object to set |
Definition at line 270 of file GEMMInfo.h.
References GEMMInfo::activation_info().
|
inline |
Set fast math flag.
[in] | fast_math | Flag to set |
Definition at line 214 of file GEMMInfo.h.
References GEMMInfo::fast_math().
|
inline |
Set fixed-format flag.
[in] | fixed_format | sets whether or not to use fixed-format kernels |
Definition at line 303 of file GEMMInfo.h.
References GEMMInfo::fixed_format().
|
inline |
Sets GEMMLowp output stage.
[in] | output_stage | Output stage to set |
Definition at line 190 of file GEMMInfo.h.
References output_stage.
|
inline |
Set post ops.
[in] | post_ops | experimental::PostOpList object to set |
Definition at line 286 of file GEMMInfo.h.
References GEMMInfo::post_ops().
|
inline |
|
inline |
|
inline |
Set weight format to be used.
[in] | weight_format | arm_compute::WeightFormat enumeration |
Definition at line 317 of file GEMMInfo.h.
References GEMMInfo::weight_format().
|
inline |
Definition at line 308 of file GEMMInfo.h.
Referenced by GEMMInfo::set_weight_format().