Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix bench
Browse files Browse the repository at this point in the history
chore: use cargo-criterion
alon-dotan-starkware committed Jan 15, 2025
1 parent 8653945 commit e1eec49
Showing 3 changed files with 39 additions and 35 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -118,12 +118,14 @@ jobs:
with:
toolchain: nightly-2025-01-02
- name: Run benchmark
run: ./scripts/bench.sh > bencher | tee output.txt
run: |
cargo install cargo-criterion
./scripts/bench.sh |& tee output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-${{github.event.pull_request.base.ref}}-benchmark
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
@@ -144,12 +146,14 @@ jobs:
with:
toolchain: nightly-2025-01-02
- name: Run benchmark
run: ./scripts/bench.sh --features="parallel" > bencher | tee output.txt
run: |
cargo install cargo-criterion
./scripts/bench.sh --features="parallel" |& tee output.txt
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-${{github.event.pull_request.base.ref}}-benchmark
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
60 changes: 30 additions & 30 deletions crates/prover/Cargo.toml
Original file line number Diff line number Diff line change
@@ -66,42 +66,42 @@ name = "bit_rev"
harness = false
name = "eval_at_point"

[[bench]]
harness = false
name = "fft"
# [[bench]]
# harness = false
# name = "fft"

[[bench]]
harness = false
name = "field"
# [[bench]]
# harness = false
# name = "field"

[[bench]]
harness = false
name = "fri"
# [[bench]]
# harness = false
# name = "fri"

[[bench]]
harness = false
name = "lookups"
# [[bench]]
# harness = false
# name = "lookups"

[[bench]]
harness = false
name = "matrix"
# [[bench]]
# harness = false
# name = "matrix"

[[bench]]
harness = false
name = "merkle"
# [[bench]]
# harness = false
# name = "merkle"

[[bench]]
harness = false
name = "poseidon"
# [[bench]]
# harness = false
# name = "poseidon"

[[bench]]
harness = false
name = "prefix_sum"
# [[bench]]
# harness = false
# name = "prefix_sum"

[[bench]]
harness = false
name = "quotients"
# [[bench]]
# harness = false
# name = "quotients"

[[bench]]
harness = false
name = "pcs"
# [[bench]]
# harness = false
# name = "pcs"
2 changes: 1 addition & 1 deletion scripts/bench.sh
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@
# Can be used as a drop in replacement for `cargo bench`.
# For example, `./scripts/bench.sh` will run all benchmarks.
# or `./scripts/bench.sh M31` will run only the M31 benchmarks.
RUSTFLAGS="-Awarnings -C target-cpu=native -C target-feature=+avx512f -C opt-level=3" cargo bench $@
RUSTFLAGS="-Awarnings -C target-cpu=native -C opt-level=3" cargo criterion --output-format bencher $@

0 comments on commit e1eec49

Please sign in to comment.