Debian Codegraph @

src/qp8-f32-qb4w-gemm/qp8-f32-qb4w-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 #include "kai/ukernels/matmul/matmul_clamp_f32_qai8dxp_qsi4c32p/kai_matmul_clamp_f32_qai8dxp4x8_qsi4c32p4x8_8x4x32_neon_i8mm.h"
11 #endif // XNN_ENABLE_KLEIDIAI
12
13 // Wraps the
14 // `kai_run_matmul_clamp_f32_qai8dxp4x8_qsi4c32p4x8_8x4x32_neon_i8mm` GEMM
15 // microkernel with a name that is compatible with our tooling.
16 void xnn_qp8_f32_qb4w_gemm_minmax_ukernel_8x4c16s2__neoni8mm_mstep2(
17 size_t m, size_t n, size_t k, const void* lhs_packed,
18 const void* rhs_packed, float* dst, size_t dst_stride_row,
19 size_t dst_stride_col,
20 const struct xnn_f32_qb4w_minmax_params
21 minmax_params[XNN_RESTRICT XNN_MIN_ELEMENTS(1)]) {
22 #if XNN_ENABLE_KLEIDIAI
23 kai_run_matmul_clamp_f32_qai8dxp4x8_qsi4c32p4x8_8x4x32_neon_i8mm(
24 m, n, k, minmax_params->scalar.blocksize, lhs_packed, rhs_packed, dst, dst_stride_row, dst_stride_col,
25 minmax_params->scalar.min, minmax_params->scalar.max);
26 #else
27 assert(
28 "Calling KleidiAI microkernel wrapper, but XNNPACK was compiled without "
29 "`XNN_ENABLE_KLEIDIAI`." && 0);
30 #endif // XNN_ENABLE_KLEIDIAI
31 }