GEMM reshape information class.
More...
#include <Types.h>
GEMM reshape information class.
This class stores the necessary information about matrix A and matrix B reshape.
The matrix A can only be reshaped through opencl::kernels::ClGemmReshapeLhsMatrixKernel or cpu::kernels::CpuGemmInterleave4x4Kernel Note: Optionally just for opencl::kernels::ClGemmReshapeLhsMatrixKernel is it possible to set mult_interleave4x4_height, the multiplication factor for the height of the 4x4 interleaved block
The matrix B can only be reshaped through opencl::kernels::ClGemmReshapeRhsMatrixKernel or cpu::kernels::CpuGemmTranspose1xWKernel Note: Optionally just for opencl::kernels::ClGemmReshapeRhsMatrixKernel is it possible to set mult_transpose1xW_width, the multiplication factor for the width of the 1xW transposed block
Definition at line 1697 of file Types.h.
◆ GEMMReshapeInfo() [1/2]
Default constructor.
Definition at line 1701 of file Types.h.
1702 : _m(1), _n(1), _k(1), _mult_transpose1xW_width(1), _mult_interleave4x4_height(1), _depth_output_gemm3d(0), _reinterpret_input_as_3d(
false), _broadcast_bias(
false)
◆ GEMMReshapeInfo() [2/2]
GEMMReshapeInfo |
( |
int |
m, |
|
|
int |
n, |
|
|
int |
k, |
|
|
int |
mult_transpose1xW_width = 1 , |
|
|
int |
mult_interleave4x4_height = 1 , |
|
|
int |
depth_output_gemm3d = 0 , |
|
|
bool |
reinterpret_input_as_3d = false , |
|
|
bool |
broadcast_bias = false |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
[in] | m | Number of matrix A rows |
[in] | n | Number of matrix B columns |
[in] | k | Number of matrix A columns or matrix B rows |
[in] | mult_transpose1xW_width | (Optional) Multiplication factor for the width of the 1xW transposed block |
[in] | mult_interleave4x4_height | (Optional) Multiplication factor for the height of the 4x4 interleaved block |
[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] | broadcast_bias | (Optional) Broadcast the shape of the bias tensor from a vector to a matrix. |
Definition at line 1718 of file Types.h.
◆ broadcast_bias()
bool broadcast_bias |
( |
| ) |
const |
|
inline |
Flag which specifies whether to broadcast the shape of the bias tensor.
- Returns
- True if the shape of the bias tensor is to be broadcasted.
Definition at line 1786 of file Types.h.
1788 return _broadcast_bias;
◆ depth_output_gemm3d()
int depth_output_gemm3d |
( |
| ) |
const |
|
inline |
Depth (third dimension) of the output tensor to be used with the GEMM3D kernel.
- Note
- GEMM3D kernel is used when the output has to be reinterpret as 3D tensor. In that case: m = depth_output_gemm3d * output_height
- Returns
- the depth of the output tensor to be used with the GEMM3D kernel
Definition at line 1770 of file Types.h.
1772 return _depth_output_gemm3d;
Referenced by arm_compute::misc::shape_calculator::compute_mm_shape().
◆ k()
Number of matrix A columns or matrix B rows.
- Returns
- the number of matrix A columns or matrix B rows
Definition at line 1743 of file Types.h.
◆ m()
◆ mult_interleave4x4_height()
int mult_interleave4x4_height |
( |
| ) |
const |
|
inline |
Multiplication factor for the height of the 4x4 interleaved block.
- Returns
- the multiplication factor for the height of the 4x4 interleaved block
Definition at line 1759 of file Types.h.
1761 return _mult_interleave4x4_height;
◆ mult_transpose1xW_width()
int mult_transpose1xW_width |
( |
| ) |
const |
|
inline |
Multiplication factor for the width of the 1xW transposed block.
- Returns
- the multiplication factor for the width of the 1xW transposed block
Definition at line 1751 of file Types.h.
1753 return _mult_transpose1xW_width;
◆ n()
◆ reinterpret_input_as_3d()
bool reinterpret_input_as_3d |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: