21.05
|
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 broadcast_bias=false, const ActivationLayerInfo &activation_info=ActivationLayerInfo()) 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 | 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... | |
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] | 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 |
Definition at line 1971 of file Types.h.
|
inline |
Activation layer to apply after the matrix multiplication.
Definition at line 2089 of file Types.h.
Referenced by NEGEMM::configure(), NEGEMMLowpMatrixMultiplyCore::configure(), GEMMInfo::set_activation_info(), NEGEMM::validate(), and NEGEMMLowpMatrixMultiplyCore::validate().
|
inline |
|
inline |
Depth of the output when GEMM output is reinterpreted as 3D tensor.
Definition at line 2017 of file Types.h.
Referenced by CLGEMMLowpMatrixMultiplyCore::configure(), NEGEMM::validate(), and CLGEMMLowpMatrixMultiplyCore::validate().
|
inline |
|
inline |
GEMMLowp output stage.
Definition at line 2041 of file Types.h.
Referenced by CLGEMMLowpMatrixMultiplyCore::configure(), NEGEMMLowpMatrixMultiplyCore::validate(), and CLGEMMLowpMatrixMultiplyCore::validate().
|
inline |
Flag which specifies if the matrix A has been reshaped.
Definition at line 1991 of file Types.h.
Referenced by NEGEMM::validate(), NEGEMMLowpMatrixMultiplyCore::validate(), and CLGEMMLowpMatrixMultiplyCore::validate().
|
inline |
Flag which specifies if the matrix B has been reshaped.
Definition at line 1999 of file Types.h.
Referenced by NEGEMM::validate(), NEGEMMLowpMatrixMultiplyCore::validate(), and CLGEMMLowpMatrixMultiplyCore::validate().
|
inline |
|
inline |
Flag which specifies if the input tensor has to be reinterpreted as 3D.
Definition at line 2025 of file Types.h.
Referenced by CLGEMMLowpMatrixMultiplyCore::configure(), CLGEMM::configure(), NEGEMM::validate(), CLGEMMLowpMatrixMultiplyCore::validate(), and CLGEMM::validate().
|
inline |
Flag which specifies if the reshape of matrix B should executed only for the first.
Definition at line 2009 of file Types.h.
Referenced by NEGEMM::configure(), CLGEMMLowpMatrixMultiplyCore::configure(), CLGEMM::configure(), NEGEMM::validate(), CLGEMMLowpMatrixMultiplyCore::validate(), and CLGEMM::validate().
|
inline |
Flag which specifies if the weights tensor has to be retained from previous run.
Definition at line 2033 of file Types.h.
Referenced by CLGEMM::configure().
|
inline |
Set activation layer info.
[in] | activation_info | ActivationLayerInfo object to set |
Definition at line 2097 of file Types.h.
References GEMMInfo::activation_info().
|
inline |
|
inline |