chromium/third_party/xnnpack/src/src/xnnpack/microparams.h

// Copyright 2022 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.

#pragma once

#include <stddef.h>
#include <stdint.h>

#include "xnnpack/common.h"


// Default: serves to differentiate pointer types for micro-kernels without fused activation.

xnn_f16_default_params;

xnn_f32_default_params;

xnn_s32_default_params;


// ReLU: serves to differentiate pointer types for micro-kernels with fused ReLU activation.

xnn_f32_relu_params;


// Scale: used by RSUM microkernels

xnn_f16_scale_params;

xnn_f16_f32acc_scale_params;

xnn_f32_scale_params;


// Scale+Min+Max: used by AVGPOOL/GAVGPOOL microkernels.

xnn_f16_scaleminmax_params;

xnn_f32_scaleminmax_params;


// Min+Max: used by VCLAMP and GEMM/IGEMM/DWCONV/MAXPOOL/etc with MINMAX activation.

xnn_bf16_minmax_params;

xnn_f16_minmax_params;

xnn_f32_minmax_params;

xnn_f16_qc4w_minmax_params;

xnn_f16_qb4w_minmax_params;

xnn_f32_qc4w_minmax_params;

xnn_f32_qb4w_minmax_params;

xnn_s8_minmax_params;

xnn_u8_minmax_params;


// Conv w. Min+Max: used by quantized GEMM/IGEMM/DWCONV microkernels with MINMAX activation.
struct xnn_qd8_quantization_params {};

xnn_qs8_conv_minmax_params;

xnn_qs8_qc8w_conv_minmax_params;

xnn_qu8_conv_minmax_params;


// Add w. Min+Max: used by quantized VADD[C] microkernels with MINMAX activation.

xnn_qs8_add_minmax_params;

xnn_qu8_add_minmax_params;


// Mul w. Min+Max: used by quantized VMUL[C] microkernels with MINMAX activation.

xnn_qs8_mul_minmax_params;

xnn_qu8_mul_minmax_params;


// RSum params used by RSUM & RDSUM microkernels.
xnn_qs8_rsum_params;

// AvgPool w. Min+Max: used by quantized GAVGPOOL microkernels with MINMAX activation.

xnn_qs8_avgpool_minmax_params;

xnn_qu8_avgpool_minmax_params;


// Abs: used by VABS microkernels.

xnn_bf16_abs_params;

xnn_f16_abs_params;


// Cvt (Convert): used by VCVT microkernels.

xnn_f16_f32_cvt_params;

xnn_f32_f16_cvt_params;

xnn_f16_qs8_cvt_params;

xnn_f32_qs8_cvt_params;

xnn_f32_qu8_cvt_params;

xnn_qs8_cvt_params;

xnn_qs16_qs8_cvt_params;

xnn_qs8_f16_cvt_params;

xnn_qs8_f32_cvt_params;

xnn_qu8_cvt_params;

xnn_qu8_f32_cvt_params;


// ELU: used by VELU microkernels.

xnn_f16_elu_params;

xnn_f32_elu_params;


// ExpMinus: used by RADDEXPMINUSMAX microkernels.

xnn_f16_expminus_params;

xnn_f32_expminus_params;

// HSwish: used by VHSWISH microkernels.

xnn_f16_hswish_params;

xnn_f32_hswish_params;

xnn_qs8_hswish_params;

xnn_qu8_hswish_params;


// LReLU (Leaky ReLU): used by VLRELU microkernels.

xnn_f16_lrelu_params;

xnn_f32_lrelu_params;

xnn_qs8_lrelu_params;

xnn_qu8_lrelu_params;


// Neg: used by VNEG microkernels.

xnn_f16_neg_params;


// Rnd (Round): used by VRNDNE/VRNDU/VRNDD/VRNDZ microkernels.

xnn_f16_rnd_params;

xnn_f32_rnd_params;


// Sigmoid: used by VSIGMOID microkernels.

xnn_f16_sigmoid_params;

xnn_f32_sigmoid_params;


// Sqrt (Square Root): used by VSQRT microkernels.

xnn_f16_sqrt_params;

xnn_f32_sqrt_params;

// Rsqrt (Reciprocal Square Root): used by VRSQRT microkernels.

xnn_f16_rsqrt_params;

xnn_f32_rsqrt_params;

// TanH (Hyperbolic Tangent): used by VTANH microkernels.

xnn_f16_tanh_params;

xnn_f32_tanh_params;


// CHW: used by CONV/DWCONV microkernels in CHW layout with Min+Max parameters.

xnn_f16_chw_params;

xnn_f32_chw_params;


// GAvgPool (Global Average Pool): used by GAVGPOOL microkernels in CHW layout with Scale+Min+Max parameters.

xnn_f16_gavgpool_params;

xnn_f32_gavgpool_params;

// Forward declare for use in microkernel headers for JIT generator functions.
struct xnn_code_buffer;

xnn_status_t;

// JIT GEMM: used by GEMM/IGEMM microkernel generators.

struct jit_gemm_params {};

xnn_x8_transpose_params;

xnn_x16_transpose_params;

xnn_x24_transpose_params;

xnn_x32_transpose_params;

xnn_x64_transpose_params;

xnn_x32_packb_params;