fix(verifier-ray): bench-compress - #3791
Closed
Tabaie wants to merge 2 commits into
Closed
Conversation
Signed-off-by: Arya Tabaie <arya.pourtabatabaie@gmail.com>
Tabaie
requested review from
YaoJGalteland and
arijitdutta67
and
a lite review from Copilot
and removed request for
Copilot
August 13, 2026 20:03
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores the verifier-ray/bench/bench_compress micro-benchmark by updating its Zig build wiring to match the post-#3455 r5_config requirements, and by ensuring zkc emits the trace output that the Go runner parses. It also adds a runner flag to benchmark the accelerated Poseidon2 path (custom RISC-V opcode) vs the software implementation.
Changes:
- Add
-accelto the Go runner and forward the corresponding Zig build option to enable/disable accelerators. - Update the benchmark’s
build.zigto supplyr5_config(and conditionally importlineth_accelerators) so it compiles after the Poseidon2 acceleration changes. - Ensure
zkc execis invoked with-vvvso the runner can observeclock cycle:trace lines andVERIFIER-MARKoutputs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| verifier-ray/bench/bench_compress/run.go | Adds -accel, forwards -Ddisable-accelerators=false when requested, and enables zkc printf output via -vvv so cycle/marker parsing works. |
| verifier-ray/bench/bench_compress/build.zig | Introduces the disable-accelerators option (defaulting to software), supplies r5_config, and conditionally imports lineth_accelerators to match Poseidon2’s new compile-time config expectations. |
| verifier-ray/bench/bench_compress/bench/bench-compress.csv | Updates the recorded baseline cycle measurement for Poseidon2 compression. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bench_compresshas not compiled since #3455 added anr5_configimport toposeidon2.zig, and its runner reported "no cycles recorded" because zkc gatesprintfoutput — which carries both theclock cycle:trace and the guest'sVERIFIER-MARKwrites — behind-vvv.Fixes both, and forwards
-Ddisable-acceleratorsthroughrun.go -accel, which makes the accelerated Poseidon2 path measurable for the first time: 141.40 cycles/call against 8674.20 for software.