Skip to content

Commit

Permalink
Use header tables to generate binary microkernel benchmarks
Browse files Browse the repository at this point in the history
This change replaces the existing quantized binary operator benchmarks.

We also now finally have enough automation in place to add binary operator benchmarks easily. Fixes #6396

Also add vunary benchmark to CMake build, and fix some issues found on some targets.

PiperOrigin-RevId: 676533418
  • Loading branch information
dsharletg authored and xnnpack-bot committed Sep 19, 2024
1 parent a72a8b1 commit 49ce38a
Show file tree
Hide file tree
Showing 12 changed files with 281 additions and 694 deletions.
10 changes: 2 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2083,26 +2083,20 @@ IF(XNNPACK_BUILD_BENCHMARKS)
qu8-rdsum
qs8-rsum
qu8-rsum
qs8-vadd
qs8-vaddc
qs8-vcvt
qs8-vmul
qs8-vmulc
qu8-f32-vcvt
qu8-gemm
qu8-gemm-fp32
qu8-gemm-rndnu
qu8-requantization
qu8-vadd
qu8-vaddc
qu8-vcvt
qu8-vmul
qu8-vmulc
x16-packw
x32-packw
x8-lut
x8-packq
x8-packw
vunary
vbinary
xN-transposec
xx-transposev)
FOREACH(BENCH ${MICROKERNEL_BENCHMARKS})
Expand Down
17 changes: 9 additions & 8 deletions bench/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -241,14 +241,6 @@ xnnpack_benchmark(
],
deps = MICROKERNEL_BENCHMARK_DEPS,
) for kernel in [
"qs8_vadd",
"qs8_vaddc",
"qs8_vmul",
"qs8_vmulc",
"qu8_vadd",
"qu8_vaddc",
"qu8_vmul",
"qu8_vmulc",
"f16_gavgpool_cw",
"f16_raddstoreexpminusmax",
"f16_rmax",
Expand Down Expand Up @@ -343,6 +335,15 @@ xnnpack_benchmark(
deps = MICROKERNEL_BENCHMARK_DEPS,
)

xnnpack_benchmark(
name = "vbinary_bench",
srcs = ["vbinary.cc"],
# TODO(b/367939259): This is not really that slow, but --config=ios_x86_64 fails to pass
# --benchmark_min_time=1x to the benchmark.
tags = xnnpack_slow_benchmark_tags(),
deps = MICROKERNEL_BENCHMARK_DEPS,
)

xnnpack_benchmark(
name = "f32_igemm_bench",
srcs = [
Expand Down
81 changes: 0 additions & 81 deletions bench/qs8-vadd.cc

This file was deleted.

80 changes: 0 additions & 80 deletions bench/qs8-vaddc.cc

This file was deleted.

82 changes: 0 additions & 82 deletions bench/qs8-vmul.cc

This file was deleted.

81 changes: 0 additions & 81 deletions bench/qs8-vmulc.cc

This file was deleted.

Loading

0 comments on commit 49ce38a

Please sign in to comment.