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

Skip_pedersen_comparison_when_checking_pie_compatibility #1855

Merged

Conversation

YairVaknin-starkware
Copy link
Collaborator

@YairVaknin-starkware YairVaknin-starkware commented Oct 18, 2024

TITLE

Skip_pedersen_comparison_when_checking_pie_compatibility

Description

As stated in the doc describing the check_pie_compatibility func, we should skip the comparison of additional_data[pedersen]. This adds the needed logic.

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.

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/skip_pedersen_comparison_when_checking_pie_compatibility branch from 53488ae to d9a20c2 Compare October 18, 2024 15:14
@YairVaknin-starkware YairVaknin-starkware removed their assignment Oct 18, 2024
Copy link

github-actions bot commented Oct 18, 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 ± σ):     33.399 s ±  0.041 s    [User: 32.598 s, System: 0.798 s]
  Range (min … max):   33.370 s … 33.428 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     32.965 s ±  0.092 s    [User: 32.139 s, System: 0.824 s]
  Range (min … max):   32.900 s … 33.030 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 ± σ):     17.764 s ±  0.034 s    [User: 31.123 s, System: 0.761 s]
  Range (min … max):   17.740 s … 17.788 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     17.728 s ±  0.035 s    [User: 30.922 s, System: 0.817 s]
  Range (min … max):   17.703 s … 17.753 s    2 runs
 
Summary
  'hyper_threading_pr threads: 2' ran
    1.00 ± 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.352 s ±  0.300 s    [User: 43.803 s, System: 0.942 s]
  Range (min … max):   12.140 s … 12.564 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     12.502 s ±  0.490 s    [User: 43.719 s, System: 1.026 s]
  Range (min … max):   12.155 s … 12.848 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.093 s ±  0.364 s    [User: 44.130 s, System: 1.024 s]
  Range (min … max):   11.835 s … 12.350 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     12.003 s ±  0.283 s    [User: 44.089 s, System: 1.064 s]
  Range (min … max):   11.802 s … 12.203 s    2 runs
 
Summary
  'hyper_threading_pr threads: 6' ran
    1.01 ± 0.04 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 ± σ):     12.121 s ±  0.169 s    [User: 44.090 s, System: 1.068 s]
  Range (min … max):   12.002 s … 12.241 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     12.245 s ±  0.237 s    [User: 44.301 s, System: 0.973 s]
  Range (min … max):   12.077 s … 12.413 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.988 s ±  0.027 s    [User: 44.713 s, System: 1.076 s]
  Range (min … max):   11.969 s … 12.007 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.911 s ±  0.221 s    [User: 44.578 s, System: 1.078 s]
  Range (min … max):   11.754 s … 12.067 s    2 runs
 
Summary
  'hyper_threading_pr threads: 16' ran
    1.01 ± 0.02 times faster than 'hyper_threading_main threads: 16'


Copy link

codecov bot commented Oct 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.32%. Comparing base (159f67d) to head (4f3d4e3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1855   +/-   ##
=======================================
  Coverage   96.32%   96.32%           
=======================================
  Files         102      102           
  Lines       40315    40318    +3     
=======================================
+ Hits        38832    38835    +3     
  Misses       1483     1483           

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

Copy link

github-actions bot commented Oct 18, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.490 ± 0.032 2.447 2.524 1.01 ± 0.02
head big_factorial 2.473 ± 0.025 2.458 2.529 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.415 ± 0.032 2.388 2.462 1.00
head big_fibonacci 2.469 ± 0.057 2.403 2.596 1.02 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 9.271 ± 0.214 9.042 9.808 1.00
head blake2s_integration_benchmark 9.429 ± 0.641 9.017 11.159 1.02 ± 0.07
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.607 ± 0.054 2.546 2.701 1.00
head compare_arrays_200000 2.621 ± 0.061 2.566 2.767 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.742 ± 0.044 1.694 1.842 1.03 ± 0.03
head dict_integration_benchmark 1.685 ± 0.016 1.663 1.704 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.426 ± 0.013 1.410 1.449 1.00
head field_arithmetic_get_square_benchmark 1.437 ± 0.018 1.416 1.474 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 9.345 ± 0.179 9.185 9.816 1.02 ± 0.02
head integration_builtins 9.181 ± 0.104 9.042 9.345 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 9.552 ± 0.137 9.401 9.889 1.00 ± 0.03
head keccak_integration_benchmark 9.534 ± 0.276 9.345 10.268 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.583 ± 0.043 2.531 2.681 1.00
head linear_search 2.592 ± 0.026 2.563 2.633 1.00 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.755 ± 0.020 1.732 1.798 1.00 ± 0.02
head math_cmp_and_pow_integration_benchmark 1.747 ± 0.017 1.718 1.775 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.701 ± 0.031 1.671 1.778 1.00
head math_integration_benchmark 1.717 ± 0.043 1.669 1.821 1.01 ± 0.03
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.439 ± 0.017 1.419 1.468 1.00
head memory_integration_benchmark 1.450 ± 0.055 1.408 1.601 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.833 ± 0.030 1.794 1.881 1.00 ± 0.03
head operations_with_data_structures_benchmarks 1.828 ± 0.044 1.787 1.899 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 599.1 ± 2.1 596.7 603.0 1.00 ± 0.01
head pedersen 597.6 ± 7.6 593.0 618.8 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 715.0 ± 4.7 710.0 725.7 1.01 ± 0.01
head poseidon_integration_benchmark 705.4 ± 4.4 696.7 710.7 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.090 ± 0.035 2.052 2.157 1.01 ± 0.02
head secp_integration_benchmark 2.059 ± 0.015 2.038 2.092 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 702.6 ± 4.2 697.2 708.4 1.00
head set_integration_benchmark 718.8 ± 10.1 695.7 730.7 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 5.095 ± 0.107 4.975 5.322 1.00 ± 0.03
head uint256_integration_benchmark 5.088 ± 0.115 4.973 5.303 1.00

@YairVaknin-starkware
Copy link
Collaborator Author

YairVaknin-starkware commented Oct 29, 2024

Could this be merged? I see it needs 1 more review.

@pefontana pefontana added this pull request to the merge queue Nov 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 5, 2024
@pefontana pefontana added this pull request to the merge queue Nov 5, 2024
Merged via the queue into main with commit 39ad790 Nov 5, 2024
73 checks passed
@pefontana pefontana deleted the yairv/skip_pedersen_comparison_when_checking_pie_compatibility branch November 5, 2024 22:50
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.

3 participants