Skip to content

Commit de123c1

Browse files
dsharletgxnnpack-bot
authored andcommitted
Use header tables to generate binary microkernel benchmarks
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 google#6396 Also add vunary benchmark to CMake build, and fix some issues found on some targets. PiperOrigin-RevId: 676633750
1 parent a72a8b1 commit de123c1

File tree

12 files changed

+281
-694
lines changed

12 files changed

+281
-694
lines changed

CMakeLists.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,26 +2083,20 @@ IF(XNNPACK_BUILD_BENCHMARKS)
20832083
qu8-rdsum
20842084
qs8-rsum
20852085
qu8-rsum
2086-
qs8-vadd
2087-
qs8-vaddc
20882086
qs8-vcvt
2089-
qs8-vmul
2090-
qs8-vmulc
20912087
qu8-f32-vcvt
20922088
qu8-gemm
20932089
qu8-gemm-fp32
20942090
qu8-gemm-rndnu
20952091
qu8-requantization
2096-
qu8-vadd
2097-
qu8-vaddc
20982092
qu8-vcvt
2099-
qu8-vmul
2100-
qu8-vmulc
21012093
x16-packw
21022094
x32-packw
21032095
x8-lut
21042096
x8-packq
21052097
x8-packw
2098+
vunary
2099+
vbinary
21062100
xN-transposec
21072101
xx-transposev)
21082102
FOREACH(BENCH ${MICROKERNEL_BENCHMARKS})

bench/BUILD.bazel

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,6 @@ xnnpack_benchmark(
241241
],
242242
deps = MICROKERNEL_BENCHMARK_DEPS,
243243
) for kernel in [
244-
"qs8_vadd",
245-
"qs8_vaddc",
246-
"qs8_vmul",
247-
"qs8_vmulc",
248-
"qu8_vadd",
249-
"qu8_vaddc",
250-
"qu8_vmul",
251-
"qu8_vmulc",
252244
"f16_gavgpool_cw",
253245
"f16_raddstoreexpminusmax",
254246
"f16_rmax",
@@ -343,6 +335,15 @@ xnnpack_benchmark(
343335
deps = MICROKERNEL_BENCHMARK_DEPS,
344336
)
345337

338+
xnnpack_benchmark(
339+
name = "vbinary_bench",
340+
srcs = ["vbinary.cc"],
341+
# TODO(b/367939259): This is not really that slow, but --config=ios_x86_64 fails to pass
342+
# --benchmark_min_time=1x to the benchmark.
343+
tags = xnnpack_slow_benchmark_tags(),
344+
deps = MICROKERNEL_BENCHMARK_DEPS,
345+
)
346+
346347
xnnpack_benchmark(
347348
name = "f32_igemm_bench",
348349
srcs = [

bench/qs8-vadd.cc

Lines changed: 0 additions & 81 deletions
This file was deleted.

bench/qs8-vaddc.cc

Lines changed: 0 additions & 80 deletions
This file was deleted.

bench/qs8-vmul.cc

Lines changed: 0 additions & 82 deletions
This file was deleted.

bench/qs8-vmulc.cc

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)