Skip to content

Commit

Permalink
refactor: migrate performance tests to perf crate
Browse files Browse the repository at this point in the history
Co-Authored-By: John Guibas <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and jtguibas committed Dec 11, 2024
1 parent 78f1676 commit 7db73b7
Show file tree
Hide file tree
Showing 11 changed files with 476 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ jobs:
- name: Run Evaluation
run: |
cd crates/eval
RUSTFLAGS='-C target-cpu=native' cargo run --release -- \
cd crates/perf
RUSTFLAGS='-C target-cpu=native' cargo run --bin evaluate --release -- \
--programs fibonacci,ssz-withdrawals,tendermint \
--post-to-slack ${{ github.ref == 'refs/heads/dev' }} \
--slack-channel-id "${{ secrets.SLACK_CHANNEL_ID }}" \
Expand Down
8 changes: 7 additions & 1 deletion crates/perf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ sp1-stark = { workspace = true }
sp1-cuda = { workspace = true }
test-artifacts = { workspace = true }

clap = { version = "4.5.9", features = ["derive"] }
anyhow = "1.0"
bincode = "1.3.3"
clap = { version = "4.5.9", features = ["derive"] }
reqwest = { version = "0.11", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
slack-rust = "0.1"
time = "0.3.26"
tokio = { version = "1.0", features = ["full"] }

[features]
native-gnark = ["sp1-sdk/native-gnark"]
Expand Down
Binary file added crates/perf/programs/fibonacci/elf
Binary file not shown.
Binary file added crates/perf/programs/fibonacci/input.bin
Binary file not shown.
Binary file added crates/perf/programs/ssz-withdrawals/elf
Binary file not shown.
Binary file added crates/perf/programs/ssz-withdrawals/input.bin
Binary file not shown.
Binary file added crates/perf/programs/tendermint/elf
Binary file not shown.
Binary file added crates/perf/programs/tendermint/input.bin
Binary file not shown.
10 changes: 10 additions & 0 deletions crates/perf/src/bin/evaluate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use anyhow::Result;
use sp1_perf::evaluate_performance;
use sp1_prover::components::DefaultProverComponents;
use sp1_stark::SP1ProverOpts;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let opts = SP1ProverOpts::default();
evaluate_performance::<DefaultProverComponents>(opts).await
}
Loading

0 comments on commit 7db73b7

Please sign in to comment.