# 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.

# AArch64 assembly
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__asm_aarch64_neonfma_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__asm_aarch64_neonfma_ld64_acc2
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__asm_aarch64_neonfma_ld64_acc2_prfm
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__asm_aarch64_neonfma_ld64_acc4
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__asm_aarch64_neonfma_ld64_acc4_prfm
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__asm_aarch64_neonfma_ld64_prfm
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x8__asm_aarch64_neonfma_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x8__asm_aarch64_neonfma_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
# ARM NEON
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__aarch64_neonfma_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__aarch64_neonfma_lane_ld128
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__neon_dup_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__neon_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__neonfma_dup_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x8__aarch64_neonfma_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x8__aarch64_neonfma_lane_ld128
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x8__neon_dup_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x8__neon_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x8__neonfma_dup_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_5x8__aarch64_neonfma_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_5x8__neon_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x8__aarch64_neonfma_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x8__aarch64_neonfma_lane_ld128
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x8__neon_dup_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x8__neon_lane_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x8__neonfma_dup_ld64
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
# x86 SSE
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x8__sse41_dup
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_3x8__sse41_dup
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x8__sse41_dup
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_5x8__sse41_dup
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x8__sse41_dup
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 4
## x86 AVX
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_2x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_3x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_5x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_7x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_8x16__avx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
# x86 AVX FMA3
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_2x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_3x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_5x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_7x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_8x16__fma3_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
# x86 AVX2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_2x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_3x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_5x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_7x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_8x16__avx2_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
# x86 AVX512
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_2x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_3x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_5x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_6x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_7x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_8x32__avx512skx_broadcast
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
# Scalar
- name: xnn_f32_qc4w_gemm_minmax_ukernel_1x4__scalar
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_2x4__scalar
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x2__scalar
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
- name: xnn_f32_qc4w_gemm_minmax_ukernel_4x4__scalar
  init: xnn_init_f32_qc4w_minmax_scalar_params
  pack: xnn_pack_f32_qc4w_gemm_goi_w
  k-block: 2
