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 circuits to cairo 1 README #1890

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Add circuits to cairo 1 README #1890

merged 4 commits into from
Dec 10, 2024

Conversation

FrancoGiachetta
Copy link
Contributor

Add circuits to cairo 1 README

Description

This PR adds some lines to the cairo 1 README, explaining how circuit programs execution show be done.

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.

@FrancoGiachetta FrancoGiachetta added the documentation Improvements or additions to documentation label Dec 9, 2024
@FrancoGiachetta FrancoGiachetta marked this pull request as ready for review December 9, 2024 13:59
Copy link

github-actions bot commented Dec 9, 2024

**Hyper Thereading Benchmark results**




hyperfine -r 2 -n "hyper_threading_main threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_main' -n "hyper_threading_pr threads: 1" 'RAYON_NUM_THREADS=1 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 1
  Time (mean ± σ):     32.684 s ±  0.010 s    [User: 31.882 s, System: 0.800 s]
  Range (min … max):   32.677 s … 32.691 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     32.250 s ±  0.117 s    [User: 31.372 s, System: 0.876 s]
  Range (min … max):   32.168 s … 32.333 s    2 runs
 
Summary
  'hyper_threading_pr threads: 1' ran
    1.01 ± 0.00 times faster than 'hyper_threading_main threads: 1'




hyperfine -r 2 -n "hyper_threading_main threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_main' -n "hyper_threading_pr threads: 2" 'RAYON_NUM_THREADS=2 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 2
  Time (mean ± σ):     18.056 s ±  0.041 s    [User: 31.576 s, System: 0.802 s]
  Range (min … max):   18.027 s … 18.085 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     17.755 s ±  0.023 s    [User: 31.038 s, System: 0.844 s]
  Range (min … max):   17.738 s … 17.771 s    2 runs
 
Summary
  'hyper_threading_pr threads: 2' ran
    1.02 ± 0.00 times faster than 'hyper_threading_main threads: 2'




hyperfine -r 2 -n "hyper_threading_main threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_main' -n "hyper_threading_pr threads: 4" 'RAYON_NUM_THREADS=4 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 4
  Time (mean ± σ):     12.289 s ±  0.291 s    [User: 43.409 s, System: 0.995 s]
  Range (min … max):   12.083 s … 12.495 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     12.392 s ±  0.580 s    [User: 43.327 s, System: 1.076 s]
  Range (min … max):   11.982 s … 12.802 s    2 runs
 
Summary
  'hyper_threading_main threads: 4' ran
    1.01 ± 0.05 times faster than 'hyper_threading_pr threads: 4'




hyperfine -r 2 -n "hyper_threading_main threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_main' -n "hyper_threading_pr threads: 6" 'RAYON_NUM_THREADS=6 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 6
  Time (mean ± σ):     12.425 s ±  0.308 s    [User: 43.425 s, System: 0.976 s]
  Range (min … max):   12.207 s … 12.643 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     12.193 s ±  0.046 s    [User: 43.573 s, System: 0.983 s]
  Range (min … max):   12.161 s … 12.226 s    2 runs
 
Summary
  'hyper_threading_pr threads: 6' ran
    1.02 ± 0.03 times faster than 'hyper_threading_main threads: 6'




hyperfine -r 2 -n "hyper_threading_main threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_main' -n "hyper_threading_pr threads: 8" 'RAYON_NUM_THREADS=8 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 8
  Time (mean ± σ):     11.991 s ±  0.175 s    [User: 44.236 s, System: 1.030 s]
  Range (min … max):   11.867 s … 12.114 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     12.126 s ±  0.090 s    [User: 44.126 s, System: 1.002 s]
  Range (min … max):   12.062 s … 12.189 s    2 runs
 
Summary
  'hyper_threading_main threads: 8' ran
    1.01 ± 0.02 times faster than 'hyper_threading_pr threads: 8'




hyperfine -r 2 -n "hyper_threading_main threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_main' -n "hyper_threading_pr threads: 16" 'RAYON_NUM_THREADS=16 ./hyper_threading_pr'
Benchmark 1: hyper_threading_main threads: 16
  Time (mean ± σ):     11.715 s ±  0.114 s    [User: 44.573 s, System: 1.082 s]
  Range (min … max):   11.635 s … 11.796 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.950 s ±  0.317 s    [User: 44.306 s, System: 1.077 s]
  Range (min … max):   11.726 s … 12.174 s    2 runs
 
Summary
  'hyper_threading_main threads: 16' ran
    1.02 ± 0.03 times faster than 'hyper_threading_pr threads: 16'


Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.34%. Comparing base (d2c056e) to head (29e0afe).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1890   +/-   ##
=======================================
  Coverage   96.34%   96.34%           
=======================================
  Files         102      102           
  Lines       40801    40801           
=======================================
  Hits        39308    39308           
  Misses       1493     1493           

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

Copy link

github-actions bot commented Dec 9, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.533 ± 0.036 2.498 2.624 1.00
head big_factorial 2.551 ± 0.094 2.491 2.813 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.459 ± 0.044 2.419 2.546 1.00
head big_fibonacci 2.489 ± 0.061 2.446 2.651 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 9.211 ± 0.082 9.102 9.336 1.00
head blake2s_integration_benchmark 9.260 ± 0.130 9.122 9.575 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.640 ± 0.036 2.592 2.694 1.01 ± 0.02
head compare_arrays_200000 2.623 ± 0.048 2.563 2.719 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.708 ± 0.050 1.674 1.846 1.01 ± 0.04
head dict_integration_benchmark 1.694 ± 0.035 1.664 1.785 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.442 ± 0.031 1.422 1.522 1.01 ± 0.02
head field_arithmetic_get_square_benchmark 1.434 ± 0.007 1.423 1.450 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 9.395 ± 0.276 9.155 9.999 1.01 ± 0.03
head integration_builtins 9.291 ± 0.168 9.166 9.724 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 9.536 ± 0.124 9.387 9.823 1.00 ± 0.01
head keccak_integration_benchmark 9.526 ± 0.066 9.415 9.630 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.602 ± 0.024 2.565 2.639 1.00
head linear_search 2.632 ± 0.056 2.570 2.776 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.756 ± 0.015 1.737 1.776 1.00
head math_cmp_and_pow_integration_benchmark 1.764 ± 0.026 1.725 1.820 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.718 ± 0.020 1.692 1.762 1.01 ± 0.03
head math_integration_benchmark 1.707 ± 0.046 1.663 1.831 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.461 ± 0.050 1.424 1.580 1.02 ± 0.04
head memory_integration_benchmark 1.438 ± 0.023 1.417 1.492 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.827 ± 0.020 1.804 1.880 1.00 ± 0.03
head operations_with_data_structures_benchmarks 1.821 ± 0.044 1.789 1.938 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 588.9 ± 4.5 581.9 597.1 1.00 ± 0.01
head pedersen 588.3 ± 5.7 581.5 597.5 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 695.5 ± 8.3 685.8 716.3 1.01 ± 0.01
head poseidon_integration_benchmark 690.0 ± 5.2 683.9 700.7 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.075 ± 0.025 2.059 2.143 1.01 ± 0.01
head secp_integration_benchmark 2.064 ± 0.005 2.057 2.071 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 688.0 ± 10.9 679.4 714.1 1.01 ± 0.02
head set_integration_benchmark 683.9 ± 5.2 677.0 694.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 5.114 ± 0.144 5.015 5.477 1.01 ± 0.03
head uint256_integration_benchmark 5.052 ± 0.064 5.000 5.228 1.00

Co-authored-by: Julian Gonzalez Calderon <[email protected]>
cairo1-run/README.md Outdated Show resolved Hide resolved
Co-authored-by: Gabriel Bosio <[email protected]>
@FrancoGiachetta FrancoGiachetta added this pull request to the merge queue Dec 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 10, 2024
@FrancoGiachetta FrancoGiachetta added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit d90bcc8 Dec 10, 2024
82 checks passed
@FrancoGiachetta FrancoGiachetta deleted the readme-mod_builtin branch December 10, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants