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

Add allow_missing_builtins flag #1600

Merged
merged 14 commits into from
Feb 6, 2024
Merged

Add allow_missing_builtins flag #1600

merged 14 commits into from
Feb 6, 2024

Conversation

fmoletta
Copy link
Member

@fmoletta fmoletta commented Feb 5, 2024

This new flag will skip the check that all builtins used by the program need to be present in the selected layout if enabled. It will also be enabled by default when running in proof_mode.
This flag has been added to : CLI, CairoRunConfig, CairoRunner::initialize & CairoRunner::initialize_builtins
Documentation has been added/updated
Other changes: Removed outdated comment from many cairo_runner tests

Copy link

github-actions bot commented Feb 5, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.281 ± 0.046 2.247 2.387 1.01 ± 0.02
head big_factorial 2.253 ± 0.014 2.237 2.278 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.239 ± 0.020 2.202 2.282 1.00 ± 0.01
head big_fibonacci 2.232 ± 0.012 2.214 2.255 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.207 ± 0.044 8.152 8.277 1.00
head blake2s_integration_benchmark 8.229 ± 0.081 8.155 8.383 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.314 ± 0.059 2.273 2.478 1.00 ± 0.03
head compare_arrays_200000 2.306 ± 0.018 2.280 2.324 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.439 ± 0.004 1.434 1.448 1.00
head dict_integration_benchmark 1.456 ± 0.010 1.444 1.469 1.01 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.294 ± 0.007 1.281 1.304 1.00
head field_arithmetic_get_square_benchmark 1.303 ± 0.041 1.277 1.413 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.284 ± 0.068 8.212 8.405 1.00
head integration_builtins 8.285 ± 0.088 8.193 8.405 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.483 ± 0.022 8.458 8.529 1.00
head keccak_integration_benchmark 8.522 ± 0.092 8.445 8.654 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.349 ± 0.016 2.329 2.390 1.00
head linear_search 2.350 ± 0.049 2.320 2.479 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.566 ± 0.007 1.558 1.579 1.00
head math_cmp_and_pow_integration_benchmark 1.572 ± 0.015 1.556 1.607 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.438 ± 0.012 1.429 1.470 1.00
head math_integration_benchmark 1.449 ± 0.023 1.431 1.510 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.255 ± 0.003 1.251 1.259 1.00
head memory_integration_benchmark 1.260 ± 0.025 1.245 1.327 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.609 ± 0.008 1.599 1.623 1.01 ± 0.01
head operations_with_data_structures_benchmarks 1.598 ± 0.004 1.594 1.607 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 605.7 ± 2.6 600.8 610.5 1.00
head pedersen 611.2 ± 13.3 604.2 648.7 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.073 ± 0.002 1.072 1.078 1.00
head poseidon_integration_benchmark 1.075 ± 0.003 1.072 1.081 1.00 ± 0.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.928 ± 0.008 1.917 1.946 1.00 ± 0.01
head secp_integration_benchmark 1.928 ± 0.009 1.914 1.941 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 758.7 ± 2.9 754.2 762.6 1.00
head set_integration_benchmark 774.3 ± 3.9 770.9 783.1 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.560 ± 0.023 4.527 4.588 1.00
head uint256_integration_benchmark 4.573 ± 0.040 4.521 4.616 1.00 ± 0.01

Copy link

codecov bot commented Feb 5, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (aeb6d19) 97.16% compared to head (ddf6be1) 97.16%.

Files Patch % Lines
vm/src/vm/runners/cairo_runner.rs 98.38% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1600   +/-   ##
=======================================
  Coverage   97.16%   97.16%           
=======================================
  Files          91       91           
  Lines       37324    37326    +2     
=======================================
+ Hits        36264    36266    +2     
  Misses       1060     1060           

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

@fmoletta fmoletta marked this pull request as ready for review February 5, 2024 19:30
juanbono
juanbono previously approved these changes Feb 5, 2024
Copy link
Member

@juanbono juanbono left a comment

Choose a reason for hiding this comment

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

LGTM

@pefontana pefontana added this pull request to the merge queue Feb 6, 2024
Merged via the queue into main with commit 64a1e97 Feb 6, 2024
50 checks passed
@pefontana pefontana deleted the allow_missing_builtins branch February 6, 2024 21:39
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.

None yet

3 participants