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.
Merge branch 'main' into rust-metrics-unify
Browse files Browse the repository at this point in the history
jonathanpwang authored Dec 31, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 11737ef + 48ecf39 commit 5e49590
Showing 78 changed files with 4,126 additions and 504 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/benchmark-call.yml
Original file line number Diff line number Diff line change
@@ -224,16 +224,16 @@ jobs:
source ci/scripts/utils.sh
generate_markdown $METRIC_PATH $METRIC_NAME ${{ env.S3_METRICS_PATH }} "."
- name: Install inferno-flamegraph
run: cargo install inferno
# - name: Install inferno-flamegraph
# run: cargo install inferno

- name: Generate flamegraphs
run: |
if [[ -f $METRIC_PATH ]]; then
python3 ci/scripts/metric_unify/flamegraph.py $METRIC_PATH
s5cmd cp '.bench_metrics/flamegraphs/*.svg' "${{ env.PUBLIC_S3_PATH }}/${current_sha}/"
echo "UPLOAD_FLAMEGRAPHS=1" >> $GITHUB_ENV
fi
# - name: Generate flamegraphs
# run: |
# if [[ -f $METRIC_PATH ]]; then
# python3 ci/scripts/metric_unify/flamegraph.py $METRIC_PATH
# s5cmd cp '.bench_metrics/flamegraphs/*.svg' "${{ env.PUBLIC_S3_PATH }}/${current_sha}/"
# echo "UPLOAD_FLAMEGRAPHS=1" >> $GITHUB_ENV
# fi

- name: Add benchmark metadata and upload markdown
id: add_metadata
8 changes: 4 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -40,8 +40,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ CURRENT_SHA }}
repository: ${{ REPO }}
ref: ${{ env.CURRENT_SHA }}
repository: ${{ env.REPO }}

- name: Create benchmark matrix from JSON
id: create-matrix
@@ -135,8 +135,8 @@ jobs:
##########################################################################
- uses: actions/checkout@v4
with:
ref: ${{ CURRENT_SHA }}
repository: ${{ REPO }}
ref: ${{ env.CURRENT_SHA }}
repository: ${{ env.REPO }}

- name: Set github pages path for PR
if: github.event_name == 'pull_request'
6 changes: 6 additions & 0 deletions .github/workflows/primitives.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ on:
paths:
- "crates/circuits/primitives/**"
- "crates/circuits/poseidon2-air/**"
- "crates/circuits/sha256-air/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
@@ -40,3 +41,8 @@ jobs:
working-directory: crates/circuits/poseidon2-air
run: |
cargo nextest run --cargo-profile fast --features parallel
- name: Run tests for sha256-air
working-directory: crates/circuits/sha256-air
run: |
cargo nextest run --cargo-profile fast --features parallel
43 changes: 43 additions & 0 deletions .github/workflows/sha256-extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: SHA2-256 Extension Tests

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]
paths:
- "crates/circuits/sha256-air/**"
- "extensions/sha256/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always
OPENVM_FAST_TEST: "1"

jobs:
tests:
runs-on:
- runs-on=${{ github.run_id }}
- runner=64cpu-linux-arm64

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- uses: taiki-e/install-action@nextest

- name: Run sha256 extension crate tests
working-directory: extensions/sha256/circuit
run: |
cargo nextest run --cargo-profile=fast
- name: Run sha256 integration tests
working-directory: extensions/sha256/tests
run: |
rustup component add rust-src --toolchain nightly-2024-10-30
cargo nextest run --cargo-profile=fast
136 changes: 105 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -45,6 +45,7 @@ members = [
"extensions/rv32im/circuit",
"extensions/rv32im/transpiler",
"extensions/rv32im/guest",
"extensions/rv32im/tests",
"extensions/ecc/circuit",
"extensions/ecc/transpiler",
"extensions/ecc/guest",
@@ -55,7 +56,10 @@ members = [
"extensions/pairing/guest",
"extensions/pairing/tests",
"extensions/rv32-adapters",
"extensions/rv32im/tests",
"extensions/sha256/circuit",
"extensions/sha256/transpiler",
"extensions/sha256/guest",
"extensions/sha256/tests",
"ci/scripts/metric_unify",
]
exclude = ["crates/sdk/example"]
@@ -102,6 +106,7 @@ openvm-sdk = { path = "crates/sdk", default-features = false }
cargo-openvm = { path = "crates/cli", default-features = false }
openvm-mod-circuit-builder = { path = "crates/circuits/mod-builder", default-features = false }
openvm-poseidon2-air = { path = "crates/circuits/poseidon2-air", default-features = false }
openvm-sha256-air = { path = "crates/circuits/sha256-air", default-features = false }
openvm-circuit-primitives = { path = "crates/circuits/primitives", default-features = false }
openvm-circuit-primitives-derive = { path = "crates/circuits/primitives/derive", default-features = false }
openvm = { path = "crates/toolchain/openvm", default-features = false }
@@ -113,8 +118,8 @@ openvm-platform = { path = "crates/toolchain/platform", default-features = false
openvm-transpiler = { path = "crates/toolchain/transpiler", default-features = false }
openvm-circuit = { path = "crates/vm", default-features = false }
openvm-circuit-derive = { path = "crates/vm/derive", default-features = false }
openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v0.1.2-alpha", default-features = false }
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v0.1.2-alpha", default-features = false }
openvm-stark-backend = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v0.1.3-alpha", default-features = false }
openvm-stark-sdk = { git = "https://github.com/openvm-org/stark-backend.git", tag = "v0.1.3-alpha", default-features = false }

# Extensions
openvm-algebra-circuit = { path = "extensions/algebra/circuit", default-features = false }
@@ -143,6 +148,9 @@ openvm-rv32-adapters = { path = "extensions/rv32-adapters", default-features = f
openvm-rv32im-circuit = { path = "extensions/rv32im/circuit", default-features = false }
openvm-rv32im-transpiler = { path = "extensions/rv32im/transpiler", default-features = false }
openvm-rv32im-guest = { path = "extensions/rv32im/guest", default-features = false }
openvm-sha256-circuit = { path = "extensions/sha256/circuit", default-features = false }
openvm-sha256-transpiler = { path = "extensions/sha256/transpiler", default-features = false }
openvm-sha256-guest = { path = "extensions/sha256/guest", default-features = false }

# Plonky3
p3-air = { git = "https://github.com/Plonky3/Plonky3.git", rev = "9b267c4" }
@@ -196,6 +204,7 @@ strum = { version = "0.26.3", features = ["derive"] }
enum-utils = "0.1.1"
backtrace = "0.3.71"
metrics = "0.23.0"
metrics-derive = "0.1.0"
cfg-if = "1.0.0"
inferno = "0.11.21"
test-case = "3.3.1"
2 changes: 1 addition & 1 deletion benchmarks/src/bin/base64_json.rs
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ fn main() -> Result<()> {
app_vm_config: Keccak256Rv32Config::default(),
leaf_fri_params: FriParameters::standard_with_100_bits_conjectured_security(agg_log_blowup)
.into(),
compiler_options: CompilerOptions::default().with_cycle_tracker(),
compiler_options: CompilerOptions::default(),
};

run_with_metric_collection("OUTPUT_PATH", || -> Result<()> {
Loading

0 comments on commit 5e49590

Please sign in to comment.