Descriptor used by the GEMM kernels */
| 60 | class ITensorInfo; |
| 61 | /** Descriptor used by the GEMM kernels */ |
| 62 | struct GEMMKernelInfo |
| 63 | { |
| 64 | GEMMKernelInfo() = default; |
| 65 | GEMMKernelInfo(unsigned int im, |
| 66 | unsigned int in, |
| 67 | unsigned int ik, |
| 68 | unsigned int idepth_output_gemm3d, |
| 69 | bool ireinterpret_input_as_3d, |
| 70 | bool ibroadcast_bias, |
| 71 | bool ifp_mixed_precision, |
| 72 | bool ihas_pad_y, |
| 73 | ActivationLayerInfo iactivation_info, |
| 74 | int inmult_transpose1xW_width, |
| 75 | int imult_interleave4x4_height, |
| 76 | GEMMLHSMatrixInfo ilhs_info, |
| 77 | GEMMRHSMatrixInfo irhs_info, |
| 78 | int32_t ina_offset, |
| 79 | int32_t inb_offset) |
| 80 | : m(im), |
| 81 | n(in), |
| 82 | k(ik), |
| 83 | depth_output_gemm3d(idepth_output_gemm3d), |
| 84 | reinterpret_input_as_3d(ireinterpret_input_as_3d), |
| 85 | broadcast_bias(ibroadcast_bias), |
| 86 | fp_mixed_precision(ifp_mixed_precision), |
| 87 | has_pad_y(ihas_pad_y), |
| 88 | activation_info(iactivation_info), |
| 89 | mult_transpose1xW_width(inmult_transpose1xW_width), |
| 90 | mult_interleave4x4_height(imult_interleave4x4_height), |
| 91 | lhs_info(ilhs_info), |
| 92 | rhs_info(irhs_info), |
| 93 | a_offset(ina_offset), |
| 94 | b_offset(inb_offset) |
| 95 | { |
| 96 | } |
| 97 | |
| 98 | unsigned int m{0}; /**< Number of LHS rows*/ |
| 99 | unsigned int n{0}; /**< Number of RHS columns*/ |
| 100 | unsigned int k{0}; /**< Number of LHS columns or RHS rows */ |
| 101 | unsigned int depth_output_gemm3d{0}; /**< Depth of the output tensor in case is reinterpreted as 3D */ |
| 102 | bool reinterpret_input_as_3d{false}; /**< Flag used to reinterpret the input as 3D */ |
| 103 | bool broadcast_bias{false}; /**< Flag used to broadcast the bias addition */ |
| 104 | bool fp_mixed_precision{false}; /**< Flag used to indicate wider accumulators (32 bit instead of 16 for FP16). */ |
| 105 | bool has_pad_y{ |
| 106 | false}; /**< Flag used to indicate if the input/output tensors have internal pad on the y direction */ |
| 107 | ActivationLayerInfo activation_info{}; /**< Activation function to perform after the matrix multiplication */ |
| 108 | int mult_transpose1xW_width{1}; /**< Multiplication factor for the width of the 1xW transposed block */ |
| 109 | int mult_interleave4x4_height{1}; /**< Multiplication factor for the height of the 4x4 interleaved block */ |
| 110 | GEMMLHSMatrixInfo |
| 111 | lhs_info{}; /**< LHS matrix information used to retrieve the number of rows processed by each thread */ |
| 112 | GEMMRHSMatrixInfo rhs_info{}; /**< RHS matrix information used for reshaping the RHS matrix */ |
| 113 | int32_t a_offset{0}; /**< Offset to be added to each element of the matrix A */ |
| 114 | int32_t b_offset{0}; /**< Offset to be added to each element of the matrix B */ |
| 115 | GEMMLowpOutputStageInfo output_stage{}; /**< GEMMLowp output stage information */ |
| 116 | }; |
| 117 | |
| 118 | /** Compute descriptor used by the depthwise convolution native kernel */ |
| 119 | struct DWCComputeKernelInfo |
no outgoing calls
no test coverage detected