| 88 | template <typename LhsScalar, typename RhsScalar, typename AccumScalar, |
| 89 | typename DstScalar, QuantizationFlavor quantization_flavor> |
| 90 | void Gemm(const MatrixParams<LhsScalar>& lhs_params, const LhsScalar* lhs_data, |
| 91 | const MatrixParams<RhsScalar>& rhs_params, const RhsScalar* rhs_data, |
| 92 | const MatrixParams<DstScalar>& dst_params, DstScalar* dst_data, |
| 93 | const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params, |
| 94 | CpuBackendContext* context) { |
| 95 | gemmlowp::ScopedProfilingLabel label("cpu_backend_gemm::Gemm"); |
| 96 | ValidateParams(lhs_params, rhs_params, dst_params, params); |
| 97 | if (dst_params.cols == 1) { |
| 98 | // GEMV case: try a custom fast GEMV path. |
| 99 | if (detail::CustomGemv(lhs_params, lhs_data, rhs_params, rhs_data, |
| 100 | dst_params, dst_data, params, context)) { |
| 101 | return; |
| 102 | } |
| 103 | } |
| 104 | gemmlowp::ScopedProfilingLabel label2("cpu_backend_gemm::Gemm: general GEMM"); |
| 105 | GemmImpl<LhsScalar, RhsScalar, AccumScalar, DstScalar, |
| 106 | quantization_flavor>::Run(lhs_params, lhs_data, rhs_params, rhs_data, |
| 107 | dst_params, dst_data, params, context); |
| 108 | } |
| 109 | |
| 110 | } // namespace cpu_backend_gemm |
| 111 | |