Skip to content

[RVV] Add RVV x32-unpool microkernel and benchmark#10773

Draft
leduclean wants to merge 3 commits into
google:masterfrom
leduclean:x32-unpool-rvv-bench
Draft

[RVV] Add RVV x32-unpool microkernel and benchmark#10773
leduclean wants to merge 3 commits into
google:masterfrom
leduclean:x32-unpool-rvv-bench

Conversation

@leduclean

@leduclean leduclean commented Jul 17, 2026

Copy link
Copy Markdown

Adds an RVV implementation of the x32-unpool microkernel, plus a benchmark for it.

The kernel does one pass per output pointer and selects fill-or-input per lane
with a mask compare, instead of the scalar kernel's fill-then-scatter. Indices
that match no pass stay filled, matching scalar semantics. Wired into
unpool-config.c and covered by the existing x32-unpool tests.

bench/x32-unpool.cc is new: it was needed to measure this, and there was no
unpool benchmark before.

Measured on a K230 (C908, VLEN=128), --benchmark_repetitions=3, mean throughput:

InW×InH / C / Pool scalar rvv speedup
7×7 / 512 / 2×2 0.67 GB/s 3.01 GB/s 4.47×
14×14 / 512 / 2×2 0.67 GB/s 2.97 GB/s 4.43×
28×28 / 256 / 2×2 0.70 GB/s 2.93 GB/s 4.19×
56×56 / 128 / 2×2 0.76 GB/s 3.12 GB/s 4.08×
112×112 / 64 / 2×2 0.89 GB/s 3.82 GB/s 4.28×
28×28 / 256 / 3×3 0.75 GB/s 3.06 GB/s 4.10×

All runs had cv ≤ 2.8%.

leduclean and others added 3 commits July 17, 2026 16:31
Signed-off-by: Le Duc Léandre <lleduc@kalrayinc.com>
There was a typo that fix the c value to 4 instead of using the loop c
variable.

Signed-off-by: Le Duc Léandre <lleduc@kalrayinc.com>
Signed-off-by: Le Duc Léandre <lleduc@kalrayinc.com>
@google-cla

google-cla Bot commented Jul 17, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@leduclean
leduclean force-pushed the x32-unpool-rvv-bench branch from 23ea594 to b976ea3 Compare July 17, 2026 14:34
@leduclean leduclean changed the title Add RVV x32-unpool microkernel and benchmark [RVV] Add RVV x32-unpool microkernel and benchmark Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant