-
Notifications
You must be signed in to change notification settings - Fork 353
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
Add Nova Public Parameter benchmark for SDK #267
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
.github/workflows/ci.yml
Outdated
@@ -70,3 +70,29 @@ jobs: | |||
runs-on: ubuntu-latest | |||
steps: | |||
- uses: bnjbvr/cargo-machete@main | |||
|
|||
bench-riscv: |
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.
Benches for every small commit is too much, for example we don't run nova benchmarks as a workflow
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.
I run this part in my local and it's fast enough to run on CI. It takes 5 minutes CI, I think it's alright.
Because I want to have continuous benchmarking flow on CI.
I can add a label feature, whenever the benchmark label is added, the CI workflow benchmark will be executed.
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.
added in #265
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.
Benching public parameter generation should live in nova-benches/
, not sdk/
.
0c50e81
to
d4631bc
Compare
I had a hard time moving from |
You don't need to use the |
Summary: Test Plan:
@@ -4,6 +4,7 @@ use ark_relations::r1cs::{ConstraintSystemRef, SynthesisError}; | |||
use nexus_nova::StepCircuit; | |||
use std::marker::PhantomData; | |||
|
|||
#[allow(dead_code)] |
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.
This shouldn't be dead code.
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.
Since this is a shared code, it is used in other benches, however I don't use the NUM_WARMUP_STEPS
in my code, so I turn off the clippy warning in compilation.
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.
True I guess it is dead for that individual build... I mean it's all test code so I guess that's fine...
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.
coincidently, the value of NUM_WARMUP_STEPS is 10, the minimum I need in criterion sample size is 10, I can plug in this value in my code and get rid of the allow[dead_code]
, but the variable name doesn't quite describe what the situation.
moved to |
@@ -90,3 +90,13 @@ jobs: | |||
run: | | |||
cargo bench --bench riscv_machine | |||
|
|||
bench-nova-public-params: |
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.
Why not also benchmark the provers themselves?
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.
Good question. I tried, criterion need 10 samples at least, one prover run on CI takes 4-6 minutes, which lead to at least 40 to 60 minutes to benchmark Prover.
I have plan to move all CI tasks, including benchmark prover to self-host Github Action in near future.
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.
Would be nice to run all of the Nova related benchmarks but this seems like a reasonable start for now.
Summary:
Test Plan:
Stack created with Sapling. Best reviewed with ReviewStack.