Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 7 additions & 14 deletions src/configs/argmaxpool-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,26 @@ static void init_f32_argmaxpool_config(void) {
const struct xnn_hardware_config* hardware_config = xnn_init_hardware_config();
assert(hardware_config != NULL);
if (hardware_config->arch_flags & xnn_arch_arm_neon) {
f32_argmaxpool_config.ukernel =
XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__neon_c4);
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__neon_c4);
f32_argmaxpool_config.primary_tile = 9;
} else {
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(
xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
f32_argmaxpool_config.primary_tile = 9;
}
#elif XNN_ARCH_ARM64
f32_argmaxpool_config.ukernel =
XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__neon_c4);
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__neon_c4);
f32_argmaxpool_config.primary_tile = 9;
#elif XNN_ARCH_X86 || XNN_ARCH_X86_64
f32_argmaxpool_config.ukernel =
XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__sse2_c4);
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__sse2_c4);
f32_argmaxpool_config.primary_tile = 9;
#elif XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
f32_argmaxpool_config.ukernel =
XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__wasmsimd_c4);
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__wasmsimd_c4);
f32_argmaxpool_config.primary_tile = 9;
#elif XNN_ARCH_RISCV && XNN_ENABLE_RISCV_VECTOR
f32_argmaxpool_config.ukernel =
XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__rvv_u1v);
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__rvv_u1v);
f32_argmaxpool_config.primary_tile = 9;
#else
f32_argmaxpool_config.ukernel =
XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
f32_argmaxpool_config.ukernel = XNN_INIT_ARGMAXPOOL_UKERNEL(xnn_f32_argmaxpool_ukernel_9p8x__scalar_c1);
f32_argmaxpool_config.primary_tile = 9;
#endif
}
Expand Down
9 changes: 3 additions & 6 deletions src/configs/conv-hwc2chw-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,21 +90,18 @@ static void init_f32_conv_hwc2chw_3x3c3s2_config(void) {
f32_conv_hwc2chw_3x3c3s2_config.output_height_tile = 1;
}
#elif XNN_ARCH_WASMSIMD || XNN_ARCH_WASMRELAXEDSIMD
f32_conv_hwc2chw_3x3c3s2_config.ukernel_with_symm_padding =
XNN_INIT_CONV_UKERNEL(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x4__wasmsimd_2x2);
f32_conv_hwc2chw_3x3c3s2_config.ukernel_with_symm_padding = XNN_INIT_CONV_UKERNEL(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x4__wasmsimd_2x2);
f32_conv_hwc2chw_3x3c3s2_config.init.f32 = xnn_init_f32_minmax_scalar_params;
f32_conv_hwc2chw_3x3c3s2_config.output_channel_tile = 4;
f32_conv_hwc2chw_3x3c3s2_config.output_height_tile = 2;
#elif XNN_ARCH_RISCV && XNN_ENABLE_RISCV_VECTOR
const struct xnn_hardware_config* hardware_config = xnn_init_hardware_config();
f32_conv_hwc2chw_3x3c3s2_config.ukernel_with_symm_padding =
XNN_INIT_CONV_UKERNEL(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x2v__rvv_2x2);
f32_conv_hwc2chw_3x3c3s2_config.ukernel_with_symm_padding = XNN_INIT_CONV_UKERNEL(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x2v__rvv_2x2);
f32_conv_hwc2chw_3x3c3s2_config.init.f32 = xnn_init_f32_minmax_scalar_params;
f32_conv_hwc2chw_3x3c3s2_config.output_channel_tile = 2 * hardware_config->vlenb / sizeof(float);
f32_conv_hwc2chw_3x3c3s2_config.output_height_tile = 2;
#else
f32_conv_hwc2chw_3x3c3s2_config.ukernel_with_symm_padding =
XNN_INIT_CONV_UKERNEL(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x4__scalar_1x1);
f32_conv_hwc2chw_3x3c3s2_config.ukernel_with_symm_padding = XNN_INIT_CONV_UKERNEL(xnn_f32_conv_hwc2chw_ukernel_3x3s2p1c3x4__scalar_1x1);
f32_conv_hwc2chw_3x3c3s2_config.init.f32 = xnn_init_f32_minmax_scalar_params;
f32_conv_hwc2chw_3x3c3s2_config.output_channel_tile = 4;
f32_conv_hwc2chw_3x3c3s2_config.output_height_tile = 1;
Expand Down
15 changes: 5 additions & 10 deletions src/configs/gemm-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ static void init_f16_gemm_config(void) {

static void init_pf16_gemm_config(void) {
#if XNN_ARCH_ARM64 && XNN_ENABLE_KLEIDIAI
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
assert(hardware_config != NULL);
if (XNN_ENABLE_ARM_SME2 && (hardware_config->arch_flags & xnn_arch_arm_sme2)) {
#if XNN_ENABLE_ARM_SME2
Expand Down Expand Up @@ -424,8 +423,7 @@ static void init_pqs8_qc8w_gemm_config(void) {

// Arch-specific parameters.
#if XNN_ARCH_ARM64 && XNN_ENABLE_KLEIDIAI
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
assert(hardware_config != NULL);
(void)hardware_config; // May be unused.
if (XNN_ENABLE_ARM_SME2 && (hardware_config->arch_flags & xnn_arch_arm_sme2)) {
Expand Down Expand Up @@ -2441,8 +2439,7 @@ static void init_qp8_f32_qc4w_gemm_config(void) {

// Arch-specific parameters.
#if XNN_ARCH_ARM64 && XNN_ENABLE_KLEIDIAI
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
assert(hardware_config != NULL);
if (XNN_ENABLE_ARM_SME2 && (hardware_config->arch_flags & xnn_arch_arm_sme2)) {
#if XNN_ENABLE_ARM_SME2
Expand Down Expand Up @@ -2503,8 +2500,7 @@ static void init_qp8_f32_qc8w_gemm_config(void) {

// Arch-specific parameters.
#if XNN_ARCH_ARM64 && XNN_ENABLE_KLEIDIAI
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
assert(hardware_config != NULL);
if (XNN_ENABLE_ARM_SME2 && (hardware_config->arch_flags & xnn_arch_arm_sme2)) {
#if XNN_ENABLE_ARM_SME2
Expand Down Expand Up @@ -5785,8 +5781,7 @@ const struct xnn_gemm_config* xnn_init_qp8_f32_qc8w_gemm_config() {
}

const struct xnn_gemm_config* xnn_init_qp8_f32_qb4w_gemm_config() {
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
if (hardware_config == NULL) {
return NULL;
}
Expand Down
6 changes: 2 additions & 4 deletions src/configs/pack-lh-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ static void init_qp8_pack_lh_config(void) {
}

const struct xnn_pack_lh_config* xnn_init_qp8_pack_lh_config() {
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
if (hardware_config == NULL) {
return NULL;
}
Expand Down Expand Up @@ -144,8 +143,7 @@ static void init_x8_igemm_pack_lh_config(void) {
}

const struct xnn_pack_lh_config* xnn_init_x8_igemm_pack_lh_config() {
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
if (hardware_config == NULL) {
return NULL;
}
Expand Down
3 changes: 1 addition & 2 deletions src/configs/raddstoreexpminusmax-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ static void init_f32_raddstoreexpminusmax_config(void) {
f32_raddstoreexpminusmax_config.ukernel = XNN_INIT_RADDSTOREEXPMINUSMAX_UKERNEL(xnn_f32_raddstoreexpminusmax_ukernel__scalar_rr2_p5_u4_acc2);
}
#elif XNN_ARCH_ARM64
f32_raddstoreexpminusmax_config.ukernel =
XNN_INIT_RADDSTOREEXPMINUSMAX_UKERNEL(xnn_f32_raddstoreexpminusmax_ukernel__neonfma_rr1_lut64_p2_u16_acc2);
f32_raddstoreexpminusmax_config.ukernel = XNN_INIT_RADDSTOREEXPMINUSMAX_UKERNEL(xnn_f32_raddstoreexpminusmax_ukernel__neonfma_rr1_lut64_p2_u16_acc2);
#elif XNN_ARCH_X86 || XNN_ARCH_X86_64
const struct xnn_hardware_config* hardware_config = xnn_init_hardware_config();
assert(hardware_config != NULL);
Expand Down
6 changes: 2 additions & 4 deletions src/configs/unary-elementwise-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -3072,8 +3072,7 @@ const struct xnn_unary_elementwise_config* xnn_init_f32_rndz_config() {
}

const struct xnn_unary_elementwise_config* xnn_init_f32_rsqrt_config(uint32_t flags) {
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
if (hardware_config == NULL) {
return NULL;
}
Expand Down Expand Up @@ -3165,8 +3164,7 @@ const struct xnn_unary_elementwise_config* xnn_init_f32_to_f16_cvt_config() {
}

const struct xnn_unary_elementwise_config* xnn_init_f32_to_qp8_cvt_config() {
const struct xnn_hardware_config* hardware_config =
xnn_init_hardware_config();
const struct xnn_hardware_config* hardware_config = XNN_INIT_hardware_config();
if (hardware_config == NULL) {
return NULL;
}
Expand Down
Loading