Skip to content

feat: refactor CairoRunner ctors to accept CairoLayout directly#2363

Open
dorimedini-starkware wants to merge 1 commit intographite-base/2363from
03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly
Open

feat: refactor CairoRunner ctors to accept CairoLayout directly#2363
dorimedini-starkware wants to merge 1 commit intographite-base/2363from
03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly

Conversation

@dorimedini-starkware
Copy link
Copy Markdown
Collaborator

@dorimedini-starkware dorimedini-starkware commented Mar 23, 2026

TITLE

Description

Description of the pull request changes and motivation.

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

This change is Reviewable

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.141 ± 0.012 2.126 2.160 1.01 ± 0.01
head big_factorial 2.128 ± 0.015 2.107 2.155 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.057 ± 0.005 2.051 2.066 1.00 ± 0.01
head big_fibonacci 2.054 ± 0.026 2.033 2.124 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 7.290 ± 0.031 7.254 7.349 1.02 ± 0.01
head blake2s_integration_benchmark 7.176 ± 0.070 7.090 7.297 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.188 ± 0.021 2.176 2.245 1.01 ± 0.01
head compare_arrays_200000 2.163 ± 0.018 2.142 2.202 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.437 ± 0.013 1.425 1.462 1.01 ± 0.01
head dict_integration_benchmark 1.429 ± 0.016 1.417 1.466 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.217 ± 0.004 1.210 1.224 1.00 ± 0.01
head field_arithmetic_get_square_benchmark 1.216 ± 0.016 1.202 1.260 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 7.400 ± 0.037 7.350 7.445 1.01 ± 0.01
head integration_builtins 7.296 ± 0.038 7.251 7.379 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 7.535 ± 0.042 7.485 7.624 1.02 ± 0.01
head keccak_integration_benchmark 7.418 ± 0.030 7.389 7.471 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.188 ± 0.035 2.161 2.269 1.01 ± 0.02
head linear_search 2.169 ± 0.014 2.154 2.203 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.521 ± 0.005 1.512 1.528 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.510 ± 0.007 1.500 1.520 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.481 ± 0.005 1.476 1.490 1.01 ± 0.01
head math_integration_benchmark 1.472 ± 0.017 1.458 1.517 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.238 ± 0.018 1.221 1.272 1.00 ± 0.02
head memory_integration_benchmark 1.233 ± 0.011 1.222 1.257 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.565 ± 0.010 1.556 1.589 1.01 ± 0.01
head operations_with_data_structures_benchmarks 1.543 ± 0.006 1.533 1.552 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 534.6 ± 2.3 532.3 538.5 1.00 ± 0.01
head pedersen 533.3 ± 5.9 528.3 548.7 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 624.4 ± 5.3 620.1 637.1 1.00 ± 0.01
head poseidon_integration_benchmark 622.1 ± 2.7 618.4 626.1 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.834 ± 0.064 1.806 2.016 1.01 ± 0.04
head secp_integration_benchmark 1.815 ± 0.007 1.808 1.827 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 688.7 ± 5.3 685.4 703.5 1.08 ± 0.01
head set_integration_benchmark 637.9 ± 4.7 633.0 648.4 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.196 ± 0.022 4.174 4.235 1.01 ± 0.01
head uint256_integration_benchmark 4.152 ± 0.035 4.124 4.241 1.00

@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch from 858b764 to c71748f Compare March 25, 2026 13:23
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params branch from 14d555d to a690cb4 Compare March 25, 2026 13:23
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 25, 2026

Codecov Report

❌ Patch coverage is 98.43750% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.17%. Comparing base (4103853) to head (ed212c4).

Files with missing lines Patch % Lines
vm/src/vm/runners/function_runner.rs 87.50% 1 Missing ⚠️
Additional details and impacted files
@@                                             Coverage Diff                                              @@
##           03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params    #2363      +/-   ##
============================================================================================================
+ Coverage                                                                     96.08%   96.17%   +0.09%     
============================================================================================================
  Files                                                                           105      105              
  Lines                                                                         37756    37770      +14     
============================================================================================================
+ Hits                                                                          36277    36326      +49     
+ Misses                                                                         1479     1444      -35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params branch from a690cb4 to a44f7b5 Compare March 25, 2026 13:37
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch 3 times, most recently from 600cd1f to 274e737 Compare March 25, 2026 14:38
Copy link
Copy Markdown
Collaborator Author

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dorimedini-starkware made 1 comment.
Reviewable status: 0 of 13 files reviewed, 1 unresolved discussion (waiting on Yael-Starkware and YairVaknin-starkware).


vm/src/cairo_run.rs line 671 at r2 (raw file):

        )
        .unwrap();
    }

just for coverage of cairo_run_fuzzed_program

Code quote:

    #[cfg(feature = "test_utils")]
    #[test]
    fn test_cairo_run_fuzzed_program() {
        let program = Program::from_bytes(
            include_bytes!("../../cairo_programs/struct.json"),
            Some("main"),
        )
        .unwrap();
        let mut hint_processor = BuiltinHintProcessor::new_empty();
        cairo_run_fuzzed_program(
            program,
            &CairoRunConfig::default(),
            &mut hint_processor,
            1000,
        )
        .unwrap();
    }

Copy link
Copy Markdown
Collaborator

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

But, do you really need this to be merged? It's anyway being completely undone by PR2367. If it makes a mess for you, just leave it.

@YairVaknin-starkware reviewed 13 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Yael-Starkware).

@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch from 274e737 to 788b4a7 Compare April 9, 2026 19:15
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params branch from a44f7b5 to 4d059c1 Compare April 9, 2026 19:15
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch from 788b4a7 to abc6ff0 Compare April 13, 2026 06:14
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params branch from 4d059c1 to 4103853 Compare April 13, 2026 06:14
@dorimedini-starkware dorimedini-starkware force-pushed the 03-18-feat_refactor_cairorunner_ctors_to_accept_cairolayout_directly branch from abc6ff0 to ed212c4 Compare April 13, 2026 06:54
Copy link
Copy Markdown
Collaborator

@YairVaknin-starkware YairVaknin-starkware left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

@YairVaknin-starkware reviewed 5 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Yael-Starkware).

Copy link
Copy Markdown
Collaborator Author

dorimedini-starkware commented Apr 16, 2026

Merge activity

@dorimedini-starkware dorimedini-starkware changed the base branch from 03-18-feat_implement_cairolayout_new_from_layout_name_and_dynamic_params to graphite-base/2363 April 16, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants