Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## 0.28.0 (TBD)
- [BREAKING] Rename miden-lifted-stark `parallel` feature to `concurrent` and make it a default one ([#1073](https://github.com/0xMiden/crypto/issues/1073)).

## 0.27.0 (2026-06-19)

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ test-docs:

.PHONY: test-p3-parallel
test-p3-parallel: ## Run Miden STARK crate tests with the parallel feature enabled
cargo test $(MIDEN_STARK_TEST_PACKAGES) -F miden-lifted-stark/parallel
cargo test $(MIDEN_STARK_TEST_PACKAGES) -F miden-lifted-stark/concurrent

.PHONY: test-large-smt
test-large-smt: ## Run large SMT unit tests and RocksDB integration tests
Expand Down
4 changes: 2 additions & 2 deletions miden-bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ tracing-forest = { features = ["ansi", "smallvec"], workspace = tr
tracing-subscriber.workspace = true

[features]
default = []
parallel = ["miden-lifted-stark/parallel"]
concurrent = ["miden-lifted-stark/concurrent"]
default = []

[lints]
workspace = true
12 changes: 6 additions & 6 deletions miden-bench/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
//!
//! ```bash
//! # Quick run with defaults (blake3:15 keccak:18 poseidon2:19):
//! cargo run -p miden-bench --features parallel --release
//! cargo run -p miden-bench --features concurrent --release
//!
//! # Custom traces:
//! cargo run -p miden-bench --features parallel --release -- keccak:15 keccak:18 keccak:19
//! cargo run -p miden-bench --features concurrent --release -- keccak:15 keccak:18 keccak:19
//!
//! # Full tracing tree:
//! cargo run -p miden-bench --features parallel --release -- -v keccak:15
//! cargo run -p miden-bench --features concurrent --release -- -v keccak:15
//!
//! # Multi-iteration with warm-up (reports min/median/mean/max):
//! cargo run -p miden-bench --features parallel --release -- -n 5 keccak:15
//! cargo run -p miden-bench --features concurrent --release -- -n 5 keccak:15
//!
//! # Miden-shaped AIR (auto log_blowup=3):
//! cargo run -p miden-bench --features parallel --release -- miden:18:51 miden:19:20
//! cargo run -p miden-bench --features concurrent --release -- miden:18:51 miden:19:20
//!
//! # Batch-STARK comparison:
//! cargo run -p miden-bench --features parallel --release -- -m batch keccak:15 keccak:18
//! cargo run -p miden-bench --features concurrent --release -- -m batch keccak:15 keccak:18
//! ```

mod batch;
Expand Down
2 changes: 1 addition & 1 deletion miden-crypto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ name = "transpose"
required-features = ["std"]

[features]
concurrent = ["dep:rayon", "miden-lifted-stark/parallel", "p3-maybe-rayon/parallel", "p3-util/parallel", "std"]
concurrent = ["dep:rayon", "miden-lifted-stark/concurrent", "p3-maybe-rayon/parallel", "p3-util/parallel", "std"]
default = ["concurrent", "std"]
executable = ["concurrent", "dep:clap"]
fuzzing = []
Expand Down
4 changes: 2 additions & 2 deletions scripts/check-features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo ""
echo "Checking targeted multi-feature combinations..."

# `cargo hack --each-feature` does not cover combinations like
# `miden-lifted-stark/testing,parallel`.
cargo check -p miden-lifted-stark --all-targets --features testing,parallel
# `miden-lifted-stark/testing,concurrent`.
cargo check -p miden-lifted-stark --all-targets --features testing,concurrent

echo "All feature combinations compiled successfully!"
2 changes: 1 addition & 1 deletion stark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ make doc
## Run An Example

```bash
cargo run -p miden-bench --features parallel --release -- keccak:15
cargo run -p miden-bench --features concurrent --release -- keccak:15
```

## Security Disclaimer
Expand Down
6 changes: 3 additions & 3 deletions stark/miden-lifted-stark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ criterion.workspace = true
tracing-subscriber.workspace = true

[features]
default = []
parallel = ["p3-maybe-rayon/parallel"]
testing = ["dep:p3-blake3", "dep:p3-blake3-air", "dep:p3-keccak", "dep:p3-keccak-air", "dep:p3-poseidon2-air"]
concurrent = ["p3-maybe-rayon/parallel"]
default = ["concurrent"]
testing = ["dep:p3-blake3", "dep:p3-blake3-air", "dep:p3-keccak", "dep:p3-keccak-air", "dep:p3-poseidon2-air"]

[[bench]]
harness = false
Expand Down
2 changes: 1 addition & 1 deletion stark/miden-lifted-stark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ at `y_j`, and the opened trace values already correspond to `p_j(y_j)`.
- **Cyclic extension** — Cross-trace accumulation uses bitwise AND for
modular indexing (power-of-two sizes).
- **Parallel execution** — Rayon parallelism throughout constraint evaluation
and per-AIR quotient division (gated by `parallel` feature).
and per-AIR quotient division (gated by `concurrent` feature).

## Entry Points

Expand Down
2 changes: 1 addition & 1 deletion stark/miden-lifted-stark/benches/deep_quotient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench deep_quotient --features testing
//!
//! # With parallelism
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench deep_quotient --features testing,parallel
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench deep_quotient --features testing,concurrent
//!
//! # Filter by field
//! cargo bench --bench deep_quotient --features testing -- goldilocks
Expand Down
2 changes: 1 addition & 1 deletion stark/miden-lifted-stark/benches/fri_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench fri_fold --features testing
//!
//! # With parallelism
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench fri_fold --features testing,parallel
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench fri_fold --features testing,concurrent
//!
//! # Filter by field
//! cargo bench --bench fri_fold --features testing -- goldilocks
Expand Down
2 changes: 1 addition & 1 deletion stark/miden-lifted-stark/benches/merkle_commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench merkle_commit --features testing
//!
//! # With parallelism
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench merkle_commit --features testing,parallel
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench --bench merkle_commit --features testing,concurrent
//!
//! # Filter by field
//! cargo bench --bench merkle_commit --features testing -- goldilocks
Expand Down
2 changes: 1 addition & 1 deletion stark/miden-lifted-stark/benches/pcs_trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//!
//! Run with:
//! ```bash
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench -p miden-lifted-stark --bench pcs_trace --features testing,parallel
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench -p miden-lifted-stark --bench pcs_trace --features testing,concurrent
//! ```

use std::time::Instant;
Expand Down
2 changes: 1 addition & 1 deletion stark/miden-lifted-stark/benches/per_air_degree_opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
//! Run:
//! ```bash
//! RUSTFLAGS="-Ctarget-cpu=native" cargo bench -p miden-lifted-stark \
//! --bench per_air_degree_opt --features testing,parallel
//! --bench per_air_degree_opt --features testing,concurrent
//! ```

use std::time::Instant;
Expand Down
6 changes: 3 additions & 3 deletions stark/miden-lifted-stark/src/prover/constraints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use p3_field::{
TwoAdicField,
};
use p3_matrix::{Matrix, bitrev::BitReversedMatrixView, dense::RowMajorMatrixView};
#[cfg(feature = "parallel")]
#[cfg(feature = "concurrent")]
use p3_maybe_rayon::prelude::*;
use packed_row_bitrev::collect_vertically_packed_row_pair_bitrev_into;

Expand Down Expand Up @@ -243,7 +243,7 @@ pub(super) fn evaluate_constraints_into<F, EF, A>(
}
};

#[cfg(feature = "parallel")]
#[cfg(feature = "concurrent")]
output.par_chunks_mut(points_per_task).enumerate().for_each_init(
|| {
(
Expand All @@ -258,7 +258,7 @@ pub(super) fn evaluate_constraints_into<F, EF, A>(
},
);

#[cfg(not(feature = "parallel"))]
#[cfg(not(feature = "concurrent"))]
{
let mut main_buf = Vec::<P<F>>::new();
let mut preproc_buf = Vec::<P<F>>::new();
Expand Down
2 changes: 1 addition & 1 deletion stark/miden-lifted-stark/src/testing/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pub const RELATIVE_SPECS: &[&[(usize, usize)]] =
&[&[(4, 10), (2, 100), (0, 50)], &[(4, 8), (2, 20), (0, 20)], &[(0, 16)]];

/// Label for benchmark group names indicating parallelism mode.
pub const PARALLEL_STR: &str = if cfg!(feature = "parallel") {
pub const PARALLEL_STR: &str = if cfg!(feature = "concurrent") {
"parallel"
} else {
"single"
Expand Down
Loading