-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wrappers for the
qp8_f32_qc8w
GEMM kernels linked from KleidiAI.
PiperOrigin-RevId: 704703418
- Loading branch information
1 parent
f9758af
commit acb51c6
Showing
47 changed files
with
1,869 additions
and
558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// This source code is licensed under the BSD-style license found in the | ||
// LICENSE file in the root directory of this source tree. | ||
// | ||
// Auto-generated file. Do not edit! | ||
// Specification: test/qp8-f32-qc8w-gemm-minmax.yaml | ||
// Generator: tools/generate-gemm-test.py | ||
|
||
#include <benchmark/benchmark.h> | ||
#include "gemm-benchmark.h" | ||
#include "utils.h" | ||
#include "xnnpack/common.h" | ||
#include "xnnpack/gemm.h" | ||
#include "xnnpack/isa-checks.h" | ||
#include "xnnpack/microfnptr.h" | ||
#include "xnnpack/microparams-init.h" | ||
#include "xnnpack/pack.h" | ||
#include "xnnpack/packw.h" | ||
|
||
|
||
#if XNN_ENABLE_ARM_I8MM && XNN_ARCH_ARM64 | ||
#if XNN_ENABLE_KLEIDIAI | ||
static void qp8_f32_qc8w_gemm_minmax_ukernel_16x4c8__neoni8mm_mstep4(benchmark::State& state, const char* net) { | ||
GEMMBenchmark(state, | ||
xnn_qp8_f32_qc8w_gemm_minmax_ukernel_16x4c8__neoni8mm_mstep4, | ||
xnn_init_f32_minmax_scalar_params, | ||
xnn_pack_kai_qs8_weights_and_biases, | ||
xnn_packed_stride_kai_qs8_weights_and_biases, | ||
/*mr=*/16, /*nr=*/4, /*kr=*/8, /*sr=*/1, | ||
/*mr_packed=*/4, | ||
benchmark::utils::CheckNEONI8MM); | ||
} | ||
|
||
BENCHMARK_GEMM(qp8_f32_qc8w_gemm_minmax_ukernel_16x4c8__neoni8mm_mstep4) | ||
#endif // XNN_ENABLE_KLEIDIAI | ||
#endif // XNN_ENABLE_ARM_I8MM && XNN_ARCH_ARM64 | ||
|
||
|
||
#if XNN_ENABLE_ARM_DOTPROD && XNN_ARCH_ARM64 | ||
#if XNN_ENABLE_KLEIDIAI | ||
static void qp8_f32_qc8w_gemm_minmax_ukernel_1x4c4__aarch64_neondot(benchmark::State& state, const char* net) { | ||
GEMMBenchmark(state, | ||
xnn_qp8_f32_qc8w_gemm_minmax_ukernel_1x4c4__aarch64_neondot, | ||
xnn_init_f32_minmax_scalar_params, | ||
xnn_pack_kai_qs8_weights_and_biases, | ||
xnn_packed_stride_kai_qs8_weights_and_biases, | ||
/*mr=*/1, /*nr=*/4, /*kr=*/4, /*sr=*/1, | ||
/*mr_packed=*/1, | ||
benchmark::utils::CheckNEONDOT); | ||
} | ||
|
||
BENCHMARK_GEMM(qp8_f32_qc8w_gemm_minmax_ukernel_1x4c4__aarch64_neondot) | ||
|
||
static void qp8_f32_qc8w_gemm_minmax_ukernel_1x4c8__aarch64_neondot(benchmark::State& state, const char* net) { | ||
GEMMBenchmark(state, | ||
xnn_qp8_f32_qc8w_gemm_minmax_ukernel_1x4c8__aarch64_neondot, | ||
xnn_init_f32_minmax_scalar_params, | ||
xnn_pack_kai_qs8_weights_and_biases, | ||
xnn_packed_stride_kai_qs8_weights_and_biases, | ||
/*mr=*/1, /*nr=*/4, /*kr=*/8, /*sr=*/1, | ||
/*mr_packed=*/1, | ||
benchmark::utils::CheckNEONDOT); | ||
} | ||
|
||
BENCHMARK_GEMM(qp8_f32_qc8w_gemm_minmax_ukernel_1x4c8__aarch64_neondot) | ||
|
||
static void qp8_f32_qc8w_gemm_minmax_ukernel_16x4c4__aarch64_neondot_mstep4(benchmark::State& state, const char* net) { | ||
GEMMBenchmark(state, | ||
xnn_qp8_f32_qc8w_gemm_minmax_ukernel_16x4c4__aarch64_neondot_mstep4, | ||
xnn_init_f32_minmax_scalar_params, | ||
xnn_pack_kai_qs8_weights_and_biases, | ||
xnn_packed_stride_kai_qs8_weights_and_biases, | ||
/*mr=*/16, /*nr=*/4, /*kr=*/4, /*sr=*/1, | ||
/*mr_packed=*/4, | ||
benchmark::utils::CheckNEONDOT); | ||
} | ||
|
||
BENCHMARK_GEMM(qp8_f32_qc8w_gemm_minmax_ukernel_16x4c4__aarch64_neondot_mstep4) | ||
#endif // XNN_ENABLE_KLEIDIAI | ||
#endif // XNN_ENABLE_ARM_DOTPROD && XNN_ARCH_ARM64 | ||
|
||
|
||
#ifndef XNNPACK_BENCHMARK_NO_MAIN | ||
BENCHMARK_MAIN(); | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.