MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / GEMMInfo

Class GEMMInfo

arm_compute/function_info/GEMMInfo.h:88–400  ·  view source on GitHub ↗

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 * */

Source from the content-addressed store, hash-verified

86 *
87 */
88class GEMMInfo
89{
90public:
91 /** Default constructor */
92 GEMMInfo() noexcept
93 : _is_a_reshaped(false),
94 _is_b_reshaped(false),
95 _reshape_b_only_on_first_run(true),
96 _depth_output_gemm3d(0),
97 _reinterpret_input_as_3d(false),
98 _retain_internal_weights(false),
99 _gemmlowp_output_stage(),
100 _fast_math(false),
101 _fp_mixed_precision(false),
102 _broadcast_bias(false),
103 _pretranspose_A(false),
104 _pretranspose_B(false),
105 _activation_info(),
106 _fixed_format(false),
107 _weight_format(arm_compute::WeightFormat::UNSPECIFIED),
108 _accumulate(false),
109 _use_fp32_acc(false)
110 {
111 }
112 /** Constructor
113 *
114 * @param[in] is_a_reshaped True if the matrix A has been reshaped
115 * @param[in] is_b_reshaped True if the matrix B has been reshaped
116 * @param[in] reshape_b_only_on_first_run Reshape matrix B only for the first run
117 * @param[in] depth_output_gemm3d (Optional) Depth (third dimension) of the output tensor to be used with the GEMM3D kernel
118 * If 0 the output will not be reinterpreted as 3D. Default 0
119 * @param[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
120 * to perform 1x1 convolutions with the NHWC data layout)
121 * @param[in] retain_internal_weights (Optional) Retain the weights tensor from previous run
122 * @param[in] gemmlowp_output_stage (Optional) GEMMLowp Output stage info
123 * @param[in] fp_mixed_precision (Optional) Use wider accumulators (32 bit instead of 16 for FP16) to improve accuracy.
124 * @param[in] fast_math (Optional) Use a data type of shorter width to improve performance
125 * @param[in] broadcast_bias (Optional) Broadcast the shape of the bias tensor from a vector to a matrix.
126 * @param[in] activation_info (Optional) Activation to apply after the matrix multiplication
127 * @param[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.
128 * @param[in] weight_format (Optional) arm_gemm:WeightFormat enumeration requested by the user. Default is arm_compute::WeightFormat::UNSPECIFIED.
129 * @param[in] pretranspose_B (Optional) Pretranspose matrix B (transposition of its lowest 2 dimensions), in addition to and before, any further transformations of B
130 * @param[in] accumulate (Optional) Whether to accumulate in destination or not
131 * @param[in] use_fp32_acc (Optional) Whether to use fp32 accumulation in fp16 matmul (applicable to fp16 matmul only, ignored in other configurations)
132 */
133 GEMMInfo(bool is_a_reshaped,
134 bool is_b_reshaped,
135 bool reshape_b_only_on_first_run,
136 int depth_output_gemm3d = 0,
137 bool reinterpret_input_as_3d = false,
138 bool retain_internal_weights = false,
139 GEMMLowpOutputStageInfo gemmlowp_output_stage = GEMMLowpOutputStageInfo(),
140 bool fp_mixed_precision = false,
141 bool fast_math = false,
142 bool broadcast_bias = false,
143 const ActivationLayerInfo &activation_info = ActivationLayerInfo(),
144 bool fixed_format = false,
145 arm_compute::WeightFormat weight_format = arm_compute::WeightFormat::UNSPECIFIED,

Callers 15

NEGEMMClass · 0.85
CpuGEMMLowpClass · 0.85
CpuGemmClass · 0.85
CLGEMMClass · 0.85
validate_argumentsFunction · 0.85
configureMethod · 0.85
validate_mmFunction · 0.85
configure_mmMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected