-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quadratic_sorting
and is_prime
benchmarks
#813
base: master
Are you sure you want to change the base?
Conversation
Thanks! We can completely remove the debug prints in the guests for now. Just make sure to have an assert or so inside the guest to make sure we got the right answers? I'm also having trouble with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see if GitHub works now..
let heap_size = 2097152; | ||
let pub_io_size = 16; | ||
let program = Program::load_elf(ceno_examples::is_prime, u32::MAX).unwrap(); | ||
let platform = setup_platform(Preset::Ceno, &program, stack_size, heap_size, pub_io_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slight tangent: the hole setup_platform business is a bit silly.
Our Ceno platform should have maximum limits (eg we can only use RAM up to something like u32::MAX - (1<<12)
or so), but the concrete limits should be automatically inferred from how much memory is actually being used in the execution.
In preparation for #813 Also stop hard-coding the examples in the examples-builder.
This PR adds
benches/
files exercising thequadratic_sorting
andis_prime
examples (the latter added in this PR). The benches target theE2EProving
segment.I've temporarily commented out a couple of things to make things work. They need to be addressed:
debug_memory_ranges
insrc/e2e.rs
.println!
in guests. The reason is that the contents of these prints are stored into a memory range which is not included in writable memory when using the default heap sizes.Additionally, I've renamed
bubble_sorting
toquadratic_sorting
which I think matches the guest code better.Later Edit:
debug_memory_ranges
can be removed entirely.