Debian Codegraph @

src/qp8-f32-qc4w-gemm/qp8-f32-qc4w-gemm-minmax-8x4c16s2-mstep2-neoni8mm.c

raw
1 // Copyright 2024 Google LLC
2 //
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree.
5
6 #include <stddef.h>
7 #include "xnnpack/microparams.h"
8
9 #if XNN_ENABLE_KLEIDIAI
10 // Keep this line indented to avoid it being pulled out of the #ifdef when the
11 // sources are amalgamated.
12 #include "kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4cxp/kai_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm.h"
13 #endif // XNN_ENABLE_KLEIDIAI
14
15 // Wraps the `kai_run_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm`
16 // GEMM microkernel with a name that is compatible with our tooling.
17 void xnn_qp8_f32_qc4w_gemm_minmax_ukernel_8x4c16s2__neoni8mm_mstep2(
18 size_t m, size_t n, size_t k, const void* lhs_packed,
19 const void* rhs_packed, float* dst, size_t dst_stride_row,
20 size_t dst_stride_col,
21 union xnn_f32_minmax_params
22 minmax_params[XNN_RESTRICT XNN_MIN_ELEMENTS(1)]) {
23 #if XNN_ENABLE_KLEIDIAI
24 kai_run_matmul_clamp_f32_qai8dxp4x8_qsi4cxp4x8_8x4x32_neon_i8mm(
25 m, n, k, lhs_packed, rhs_packed, dst, dst_stride_row, dst_stride_col,
26 minmax_params->scalar.min, minmax_params->scalar.max);
27 #else
28 assert(
29 "Calling KleidiAI microkernel wrapper, but XNNPACK was compiled without "
30 "`XNN_ENABLE_KLEIDIAI`." && 0);
31 #endif // XNN_ENABLE_KLEIDIAI
32 }