Skip to content

fix(benches): honor RUST_MIN_STACK for weierstrass Criterion mains - #1405

Open
kutluhaneth46 wants to merge 1 commit into
scroll-tech:masterfrom
kutluhaneth46:cursor/bench-stack-88c1
Open

kutluhaneth46 wants to merge 1 commit into
scroll-tech:masterfrom
kutluhaneth46:cursor/bench-stack-88c1

Conversation

@kutluhaneth46

Copy link
Copy Markdown

Summary

RUST_MIN_STACK and linker stack-size flags do not affect Criterion'''s generated main. This adds a shared bench helper that spawns the runner on a thread with RUST_MIN_STACK (or a 32MiB default) and wires weierstrass add/double benches through it.

Usage:

RUST_MIN_STACK=67108864 cargo bench -p ceno_zkvm --bench weierstrass_add

Test plan

  • cargo bench -p ceno_zkvm --bench weierstrass_add -- --test (or smoke run)

Fixes #1075

Criterion's generated main does not pick up RUST_MIN_STACK. Share a
helper that spawns the bench runner on a thread with the env-configured
(or default 32MiB) stack size.

Fixes scroll-tech#1075

This branch has not been deployed

No deployments
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.

Not able to change stack size in cargo bench.

1 participant