Skip to content
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

Execute config run in parallel #2677

Merged
merged 3 commits into from
Nov 15, 2024
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `generate_random_felt()` for generating (pseudo) random felt value.
- Printing information about compiling Sierra using `universal-sierra-compiler`

#### Changed

- Tests config run is now executed in parallel resulting in faster `snforge test` setup in some cases

### Cast

#### Added
Expand Down
4 changes: 3 additions & 1 deletion crates/forge-runner/src/running/with_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ use cairo_lang_sierra::{
};
use cairo_lang_sierra_type_size::get_type_size_map;
use cairo_lang_utils::unordered_hash_map::UnorderedHashMap;
use rayon::iter::IntoParallelRefIterator;
use rayon::iter::ParallelIterator;
use starknet_types_core::felt::Felt;
use std::{collections::HashMap, sync::Arc};
use universal_sierra_compiler_api::{compile_sierra_at_path, SierraType};
Expand Down Expand Up @@ -58,7 +60,7 @@ pub fn test_target_with_config(test_target_raw: TestTargetRaw) -> Result<TestTar
.unwrap_or(&default_executables);

let test_cases = executables
.iter()
.par_iter()
.map(|case| -> Result<TestCaseWithConfig> {
let func = funcs[&case.id];

Expand Down
Loading