Skip to content

Commit

Permalink
Clean up vhswish and vlrelu microkernel tests
Browse files Browse the repository at this point in the history
- Eliminated vhswish yaml files in favor of headers (b/361780131)
- vhswish was missing in-place tests
- vhswish tests did a strange double initialization, looks like leftover debugging code.
- Also removed some remenants of audio processing kernels

PiperOrigin-RevId: 688317213
  • Loading branch information
dsharletg authored and xnnpack-bot committed Oct 21, 2024
1 parent b1cddd2 commit b410980
Show file tree
Hide file tree
Showing 126 changed files with 490 additions and 4,362 deletions.
4 changes: 1 addition & 3 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,6 @@ MICROKERNEL_HDRS = [
"src/xnnpack/unpool.h",
"src/xnnpack/vbinary.h",
"src/xnnpack/vcvt.h",
"src/xnnpack/vhswish.h",
"src/xnnpack/vlog.h",
"src/xnnpack/vlrelu.h",
"src/xnnpack/vmulcaddc.h",
"src/xnnpack/vscaleexpminusmax.h",
"src/xnnpack/vscaleextexp.h",
Expand Down Expand Up @@ -322,6 +319,7 @@ xnnpack_cc_library(
deps = [
":common",
":config_hdrs",
":fp16",
":math",
":memory",
":microparams",
Expand Down
3 changes: 1 addition & 2 deletions bench/vunary.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
#include "xnnpack/microfnptr.h"
#include "xnnpack/microparams-init.h"
#include "xnnpack/microparams.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"
#include <benchmark/benchmark.h>

template <typename T>
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ tools/generate-dwconv2d-chw-test.py --spec test/f32-dwconv2d-chw.yaml --output t
### Tests for VHSwish micro-kernels
tools/generate-vunary-test.py --tester VUnaryMicrokernelTester --ukernel f16-vhswish --output test/f16-vhswish.cc &
tools/generate-vunary-test.py --tester VUnaryMicrokernelTester --ukernel f32-vhswish --output test/f32-vhswish.cc &
tools/generate-vhswish-test.py --spec test/qs8-vhswish.yaml --output test/qs8-vhswish.cc &
tools/generate-vhswish-test.py --spec test/qu8-vhswish.yaml --output test/qu8-vhswish.cc &
tools/generate-vunary-test.py --tester VHSwishMicrokernelTester --ukernel qs8-vhswish --output test/qs8-vhswish.cc &
tools/generate-vunary-test.py --tester VHSwishMicrokernelTester --ukernel qu8-vhswish --output test/qu8-vhswish.cc &

### Tests for IBilinear micro-kernels
tools/generate-ibilinear-test.py --spec test/f16-ibilinear.yaml --output test/f16-ibilinear.cc &
Expand Down
1 change: 0 additions & 1 deletion src/configs/unary-elementwise-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "xnnpack/microparams-init.h"
#include "xnnpack/packq.h"
#include "xnnpack/vcvt.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"

static struct xnn_unary_elementwise_config f16_abs_config = {0};
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-avx-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__avx_u16(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-avx-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__avx_u32(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-avx-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__avx_u8(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-neon-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <arm_neon.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__neon_u16(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-neon-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <arm_neon.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__neon_u32(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-neon-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <arm_neon.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__neon_u8(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-scalar-u1.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <assert.h>

#include "xnnpack/math.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__scalar_u1(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-scalar-u2.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <assert.h>

#include "xnnpack/math.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__scalar_u2(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-scalar-u4.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <assert.h>

#include "xnnpack/math.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__scalar_u4(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-sse2-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <emmintrin.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"
#include "xnnpack/unaligned.h"


Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-sse2-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <emmintrin.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"
#include "xnnpack/unaligned.h"


Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-sse41-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__sse41_u16(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-sse41-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__sse41_u32(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-sse41-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__sse41_u8(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-ssse3-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <tmmintrin.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"
#include "xnnpack/unaligned.h"


Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-ssse3-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <tmmintrin.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"
#include "xnnpack/unaligned.h"


Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-wasmsimd-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <wasm_simd128.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__wasmsimd_u16(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-wasmsimd-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <wasm_simd128.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__wasmsimd_u32(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/gen/qs8-vhswish-wasmsimd-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <wasm_simd128.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vhswish_ukernel__wasmsimd_u8(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/neon.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#include <arm_neon.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


$XINT8_T = {"QS8": "int8_t", "QU8": "uint8_t"}[DATATYPE]
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/scalar.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#include <assert.h>

#include "xnnpack/math.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


$XINT8_T = {"QS8": "int8_t", "QU8": "uint8_t"}[DATATYPE]
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/sse2.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#include <emmintrin.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"
#include "xnnpack/unaligned.h"


Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/sse4.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


$XINT8_T = {"QS8": "int8_t", "QU8": "uint8_t"}[DATATYPE]
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/ssse3.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#include <tmmintrin.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"
#include "xnnpack/unaligned.h"


Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vhswish/wasmsimd.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#include <wasm_simd128.h>

#include "xnnpack/common.h"
#include "xnnpack/vhswish.h"
#include "xnnpack/vunary.h"


$XINT8_T = {"QS8": "int8_t", "QU8": "uint8_t"}[DATATYPE]
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/armsimd32.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/math.h"
#include "xnnpack/unaligned.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


$XINT8_T = {"QS8": "int8_t", "QU8": "uint8_t"}[DATATYPE]
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/avx2.c.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $ABC = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


$XINT8_T = {"QS8": "int8_t", "QU8": "uint8_t"}[DATATYPE]
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-armsimd32-u4.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/math.h"
#include "xnnpack/unaligned.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__armsimd32_u4(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-armsimd32-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/math.h"
#include "xnnpack/unaligned.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__armsimd32_u8(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-avx-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__avx_u16(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-avx-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__avx_u32(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-avx-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__avx_u8(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-avx2-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__avx2_u16(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-avx2-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__avx2_u32(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-avx2-u64.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "xnnpack/common.h"
#include "xnnpack/intrinsics-polyfill.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__avx2_u64(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-neon-u16.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <arm_neon.h>

#include "xnnpack/common.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__neon_u16(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-neon-u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <arm_neon.h>

#include "xnnpack/common.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__neon_u32(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-neon-u8.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <arm_neon.h>

#include "xnnpack/common.h"
#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__neon_u8(
Expand Down
2 changes: 1 addition & 1 deletion src/qs8-vlrelu/gen/qs8-vlrelu-rvv-u1v.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <riscv_vector.h>

#include "xnnpack/vlrelu.h"
#include "xnnpack/vunary.h"


void xnn_qs8_vlrelu_ukernel__rvv_u1v(
Expand Down
Loading

0 comments on commit b410980

Please sign in to comment.