21.08
|
GEMM information class. More...
#include <Types.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(), bool constant_weights=true) 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... | |
bool | broadcast_bias () const |
Flag which specifies whether to broadcast the shape of the bias tensor. More... | |
bool | pretranpose_B () const |
Flag which specifies whether b should be pre-transposed if supported. More... | |
void | set_pretranpose_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... | |
bool | constant_weights () const |
Flag which specifies if the values of the weights tensor are constant throughout multiple executions or not. 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
|
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] | constant_weights | (Optional) Weights have constant values throughout multiple executions |
Definition at line 1976 of file Types.h.
|
inline |
Activation layer to apply after the matrix multiplication.
Definition at line 2104 of file Types.h.
Referenced by CpuGemmLowpMatrixMultiplyCore::configure(), CpuGemm::validate(), and CpuGemmLowpMatrixMultiplyCore::validate().
|
inline |
Flag which specifies whether to broadcast the shape of the bias tensor.
Definition at line 2080 of file Types.h.
Referenced by arm_compute::operator<<().
|
inline |
Flag which specifies if the values of the weights tensor are constant throughout multiple executions or not.
Definition at line 2120 of file Types.h.
Referenced by ClGemm::configure(), and ClGemm::validate().
|
inline |
Depth of the output when GEMM output is reinterpreted as 3D tensor.
Definition at line 2024 of file Types.h.
Referenced by ClGemmLowpMatrixMultiplyCore::configure(), arm_compute::operator<<(), ClGemmLowpMatrixMultiplyCore::validate(), and CpuGemm::validate().
|
inline |
|
inline |
Flag which specifies if a wider accumulator should be used.
Definition at line 2064 of file Types.h.
Referenced by arm_compute::operator<<().
|
inline |
GEMMLowp output stage.
Definition at line 2048 of file Types.h.
Referenced by ClGemmLowpMatrixMultiplyCore::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), ClGemmLowpMatrixMultiplyCore::prepare(), CpuGemmLowpMatrixMultiplyCore::run(), ClGemmLowpMatrixMultiplyCore::validate(), and CpuGemmLowpMatrixMultiplyCore::validate().
|
inline |
Flag which specifies if the matrix A has been reshaped.
Definition at line 1998 of file Types.h.
Referenced by arm_compute::operator<<(), ClGemmLowpMatrixMultiplyCore::validate(), CpuGemm::validate(), and CpuGemmLowpMatrixMultiplyCore::validate().
|
inline |
Flag which specifies if the matrix B has been reshaped.
Definition at line 2006 of file Types.h.
Referenced by arm_compute::operator<<(), ClGemmLowpMatrixMultiplyCore::validate(), CpuGemm::validate(), and CpuGemmLowpMatrixMultiplyCore::validate().
|
inline |
Flag which specifies whether b should be pre-transposed if supported.
Definition at line 2088 of file Types.h.
Referenced by arm_compute::operator<<().
|
inline |
Flag which specifies if the input tensor has to be reinterpreted as 3D.
Definition at line 2032 of file Types.h.
Referenced by ClGemm::configure(), ClGemmLowpMatrixMultiplyCore::configure(), arm_compute::operator<<(), ClGemm::validate(), CpuGemm::validate(), and ClGemmLowpMatrixMultiplyCore::validate().
|
inline |
Flag which specifies if the reshape of matrix B should executed only for the first.
Definition at line 2016 of file Types.h.
Referenced by ClGemm::configure(), CpuGemm::configure(), ClGemmLowpMatrixMultiplyCore::configure(), CpuGemmLowpMatrixMultiplyCore::configure(), arm_compute::operator<<(), ClGemm::validate(), ClGemmLowpMatrixMultiplyCore::validate(), and CpuGemm::validate().
|
inline |
Flag which specifies if the weights tensor has to be retained from previous run.
Definition at line 2040 of file Types.h.
Referenced by ClGemm::configure(), CLGEMM::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), and arm_compute::operator<<().
|
inline |
Set activation layer info.
[in] | activation_info | ActivationLayerInfo object to set |
Definition at line 2112 of file Types.h.
|
inline |
Sets GEMMLowp output stage.
[in] | output_stage | Output stage to set |
Definition at line 2056 of file Types.h.
Referenced by CpuGemmLowpMatrixMultiplyCore::configure().
|
inline |