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

Implement CairoRunner.get_cairo_pie #1375

Merged
merged 40 commits into from
Aug 22, 2023
Merged

Implement CairoRunner.get_cairo_pie #1375

merged 40 commits into from
Aug 22, 2023

Conversation

fmoletta
Copy link
Member

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.

@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #1375 (64b04cd) into main (132da2c) will increase coverage by 0.01%.
The diff coverage is 98.76%.

@@            Coverage Diff             @@
##             main    #1375      +/-   ##
==========================================
+ Coverage   97.50%   97.51%   +0.01%     
==========================================
  Files          93       94       +1     
  Lines       38081    38485     +404     
==========================================
+ Hits        37129    37528     +399     
- Misses        952      957       +5     
Files Changed Coverage Δ
vm/src/vm/runners/cairo_pie.rs 75.00% <75.00%> (ø)
vm/src/types/program.rs 99.32% <93.33%> (-0.22%) ⬇️
vm/src/vm/runners/builtin_runner/hash.rs 98.60% <100.00%> (+0.06%) ⬆️
vm/src/vm/runners/builtin_runner/mod.rs 99.38% <100.00%> (+<0.01%) ⬆️
vm/src/vm/runners/builtin_runner/output.rs 97.31% <100.00%> (+0.14%) ⬆️
vm/src/vm/runners/builtin_runner/signature.rs 97.00% <100.00%> (+0.26%) ⬆️
vm/src/vm/runners/cairo_runner.rs 98.06% <100.00%> (+0.13%) ⬆️
vm/src/vm/vm_memory/memory.rs 98.76% <100.00%> (+0.02%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

github-actions bot commented Aug 14, 2023

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 4.860 ± 0.035 4.806 4.920 1.00
head big_factorial 5.153 ± 0.033 5.105 5.210 1.06 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 4.115 ± 0.052 4.053 4.238 1.00
head big_fibonacci 4.548 ± 0.136 4.433 4.879 1.11 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 11.822 ± 0.107 11.630 11.984 1.00
head blake2s_integration_benchmark 13.026 ± 0.157 12.763 13.217 1.10 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 4.256 ± 0.035 4.204 4.314 1.00
head compare_arrays_200000 4.532 ± 0.048 4.446 4.610 1.06 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 2.764 ± 0.032 2.735 2.847 1.00
head dict_integration_benchmark 2.945 ± 0.017 2.927 2.974 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.938 ± 0.016 1.915 1.964 1.00
head field_arithmetic_get_square_benchmark 2.065 ± 0.012 2.051 2.089 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 11.658 ± 0.096 11.554 11.893 1.00
head integration_builtins 13.061 ± 0.404 12.644 13.750 1.12 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 12.092 ± 0.162 11.956 12.502 1.00
head keccak_integration_benchmark 12.962 ± 0.094 12.859 13.187 1.07 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base linear_search 4.174 ± 0.033 4.122 4.229 1.00
head linear_search 4.466 ± 0.048 4.396 4.554 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 2.991 ± 0.033 2.942 3.065 1.00
head math_cmp_and_pow_integration_benchmark 3.160 ± 0.030 3.120 3.210 1.06 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 2.662 ± 0.025 2.637 2.711 1.00
head math_integration_benchmark 2.867 ± 0.023 2.837 2.914 1.08 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 2.393 ± 0.017 2.377 2.426 1.00
head memory_integration_benchmark 2.557 ± 0.025 2.511 2.590 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 2.587 ± 0.023 2.538 2.618 1.00
head operations_with_data_structures_benchmarks 2.766 ± 0.014 2.745 2.788 1.07 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base pedersen 1.034 ± 0.015 1.004 1.050 1.00
head pedersen 1.073 ± 0.015 1.053 1.102 1.04 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base poseidon_integration_benchmark 1.803 ± 0.024 1.776 1.854 1.00
head poseidon_integration_benchmark 1.846 ± 0.025 1.815 1.898 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 3.478 ± 0.041 3.418 3.565 1.00
head secp_integration_benchmark 3.672 ± 0.059 3.618 3.803 1.06 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base set_integration_benchmark 1.909 ± 0.015 1.875 1.927 1.00
head set_integration_benchmark 1.953 ± 0.016 1.930 1.984 1.02 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 7.252 ± 0.086 7.131 7.412 1.00
head uint256_integration_benchmark 7.850 ± 0.088 7.731 8.017 1.08 ± 0.02

@fmoletta fmoletta changed the title [WIP] Implement CairoRunner.get_cairo_pie Implement CairoRunner.get_cairo_pie Aug 16, 2023
@fmoletta fmoletta marked this pull request as ready for review August 16, 2023 21:40
let return_fp = vm.segments.memory.get_relocatable(return_fp_addr)?;
let return_pc = vm.segments.memory.get_relocatable((return_fp_addr + 1)?)?;

if let None | Some(false) = return_fp
Copy link
Member

Choose a reason for hiding this comment

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

TIL I could pattern match this hard in if let.

@pefontana pefontana added this pull request to the merge queue Aug 22, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 22, 2023
@pefontana pefontana added this pull request to the merge queue Aug 22, 2023
Merged via the queue into main with commit 2d214f7 Aug 22, 2023
38 checks passed
@pefontana pefontana deleted the runner-get-cairo-pie branch August 22, 2023 23:34
@pefontana
Copy link
Member

pefontana commented Sep 1, 2023

@abdelhamidbakhta @drspacemn (not sure if this is Ben´s github user)
We can continue the conversation about the usage of CairoPIE in Madara here.
Does the integration work OK?

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