MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReferenceGemm

Function ReferenceGemm

tensorflow/lite/kernels/cpu_backend_gemm_test.cc:340–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
339 typename DstScalar, QuantizationFlavor quantization_flavor>
340void ReferenceGemm(
341 const MatrixParams<LhsScalar>& lhs_params, const LhsScalar* lhs_data,
342 const MatrixParams<RhsScalar>& rhs_params, const RhsScalar* rhs_data,
343 const MatrixParams<DstScalar>& dst_params, DstScalar* dst_data,
344 const GemmParams<AccumScalar, DstScalar, quantization_flavor>& params,
345 CpuBackendContext* context) {
346 ruy::Matrix<LhsScalar> ruy_lhs;
347 ruy::Matrix<RhsScalar> ruy_rhs;
348 ruy::Matrix<DstScalar> ruy_dst;
349 cpu_backend_gemm::detail::MakeRuyMatrix(lhs_params, lhs_data, &ruy_lhs);
350 cpu_backend_gemm::detail::MakeRuyMatrix(rhs_params, rhs_data, &ruy_rhs);
351 cpu_backend_gemm::detail::MakeRuyMatrix(dst_params, dst_data, &ruy_dst);
352
353 ruy::BasicSpec<AccumScalar, DstScalar> ruy_spec;
354 cpu_backend_gemm::detail::MakeRuySpec(params, &ruy_spec);
355
356 ruy::Mul<ruy::Path::kReference>(ruy_lhs, ruy_rhs, ruy_spec,
357 context->ruy_context(), &ruy_dst);
358}
359
360template <typename LhsScalar, typename RhsScalar, typename AccumScalar,
361 typename DstScalar>

Callers 1

TestSomeGemmFunction · 0.70

Calls 3

MakeRuyMatrixFunction · 0.85
MakeRuySpecFunction · 0.85
ruy_contextMethod · 0.80

Tested by

no test coverage detected