-
Notifications
You must be signed in to change notification settings - Fork 330
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
feat: autoscale shard / batch size #1435
Conversation
SP1 Performance Test Results Branch: yuwen/ci-lowmem
|
.github/workflows/pr.yml
Outdated
@@ -262,3 +262,38 @@ jobs: | |||
--branch-name "${{ github.head_ref || github.ref_name }}" \ | |||
--commit-hash "${{ github.sha }}" \ | |||
--author "${{ github.event.pull_request.user.login || github.actor }}" | |||
|
|||
# Runs on a c7a.2xlarge machine, which only has 16GiB memory. | |||
memory: |
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 call this low-memory
.github/workflows/pr.yml
Outdated
|
||
# Runs on a c7a.2xlarge machine, which only has 16GiB memory. | ||
memory: | ||
name: Memory |
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.
Low Memory
.github/workflows/pr.yml
Outdated
@@ -262,3 +262,38 @@ jobs: | |||
--branch-name "${{ github.head_ref || github.ref_name }}" \ | |||
--commit-hash "${{ github.sha }}" \ | |||
--author "${{ github.event.pull_request.user.login || github.actor }}" | |||
|
|||
# Runs on a c7a.2xlarge machine, which only has 16GiB memory. |
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.
dont' need this comment
crates/stark/src/opts.rs
Outdated
@@ -42,19 +45,47 @@ pub struct SP1CoreOpts { | |||
pub records_and_traces_channel_capacity: usize, | |||
} | |||
|
|||
// Calculate the default shard size using an empirically determined formula. |
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.
triple slash
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.
can u also explain this formula lol
crates/stark/src/opts.rs
Outdated
let default_shard_size = shard_size(total_available_mem); | ||
let default_shard_batch_size = shard_batch_size(total_available_mem); | ||
|
||
println!("total memory: {total_available_mem} GB"); |
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.
don't add random prints to code, use tracing::debug or something
@@ -57,7 +57,7 @@ fn main() { | |||
// It is strongly recommended you use the network prover given the size of these programs. | |||
if args.prove { | |||
println!("Starting proof generation."); | |||
let proof = client.prove(&pk, stdin).compressed().run().expect("Proving should work."); | |||
let proof = client.prove(&pk, stdin).core().run().expect("Proving should work."); |
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.
get rid
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.
u don't need it
@@ -46,7 +46,7 @@ fn main() { | |||
|
|||
let execute = client.execute(TENDERMINT_ELF, stdin.clone()).run().expect("proving failed"); | |||
|
|||
let proof = client.prove(&pk, stdin).compressed().run().expect("proving failed"); |
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.
get rid of this change
No description provided.