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

Changes_for_using_hint_extention_feature #1880

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

YairVaknin-starkware
Copy link
Collaborator

TITLE

Changes_for_using_hint_extention_feature

Description

These changes are needed, so I could make use of the hint extention feature, when trying to load a program with hints that is nested withing a program.

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.

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/changes_for_using_hint_extention_feature branch 3 times, most recently from 3a6b6c6 to ca88b12 Compare November 24, 2024 15:30
Copy link

github-actions bot commented Nov 24, 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.063 s ±  0.121 s    [User: 31.176 s, System: 0.884 s]
  Range (min … max):   31.978 s … 32.148 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     31.996 s ±  0.035 s    [User: 31.183 s, System: 0.811 s]
  Range (min … max):   31.972 s … 32.021 s    2 runs
 
Summary
  'hyper_threading_pr threads: 1' ran
    1.00 ± 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.613 s ±  0.010 s    [User: 30.803 s, System: 0.836 s]
  Range (min … max):   17.606 s … 17.620 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     17.641 s ±  0.064 s    [User: 30.970 s, System: 0.708 s]
  Range (min … max):   17.596 s … 17.687 s    2 runs
 
Summary
  'hyper_threading_main threads: 2' ran
    1.00 ± 0.00 times faster than 'hyper_threading_pr 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.229 s    [User: 43.028 s, System: 1.048 s]
  Range (min … max):   12.126 s … 12.451 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     12.406 s ±  0.548 s    [User: 43.408 s, System: 0.990 s]
  Range (min … max):   12.019 s … 12.794 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.352 s ±  0.431 s    [User: 43.860 s, System: 1.030 s]
  Range (min … max):   12.047 s … 12.656 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.702 s ±  0.120 s    [User: 44.160 s, System: 1.037 s]
  Range (min … max):   11.617 s … 11.787 s    2 runs
 
Summary
  'hyper_threading_pr threads: 6' ran
    1.06 ± 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 ± σ):     11.724 s ±  0.254 s    [User: 44.204 s, System: 1.013 s]
  Range (min … max):   11.544 s … 11.904 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     12.132 s ±  0.102 s    [User: 43.931 s, System: 1.000 s]
  Range (min … max):   12.060 s … 12.205 s    2 runs
 
Summary
  'hyper_threading_main threads: 8' ran
    1.03 ± 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.875 s ±  0.325 s    [User: 44.248 s, System: 1.088 s]
  Range (min … max):   11.645 s … 12.105 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.689 s ±  0.137 s    [User: 44.314 s, System: 1.128 s]
  Range (min … max):   11.592 s … 11.786 s    2 runs
 
Summary
  'hyper_threading_pr threads: 16' ran
    1.02 ± 0.03 times faster than 'hyper_threading_main threads: 16'


@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/changes_for_using_hint_extention_feature branch 2 times, most recently from 50e1fa4 to d2b5e95 Compare November 24, 2024 16:01
Copy link

github-actions bot commented Nov 24, 2024

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.508 ± 0.078 2.453 2.723 1.00
head big_factorial 2.524 ± 0.100 2.447 2.720 1.01 ± 0.05
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.436 ± 0.024 2.404 2.481 1.01 ± 0.01
head big_fibonacci 2.424 ± 0.015 2.405 2.444 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 9.295 ± 0.393 9.041 10.301 1.01 ± 0.05
head blake2s_integration_benchmark 9.168 ± 0.230 9.006 9.721 1.00
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.587 ± 0.040 2.552 2.666 1.00 ± 0.03
head compare_arrays_200000 2.582 ± 0.073 2.541 2.785 1.00
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.692 ± 0.034 1.664 1.786 1.01 ± 0.02
head dict_integration_benchmark 1.679 ± 0.015 1.663 1.705 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.431 ± 0.017 1.413 1.460 1.01 ± 0.01
head field_arithmetic_get_square_benchmark 1.416 ± 0.009 1.409 1.435 1.00
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 9.457 ± 0.376 9.165 10.361 1.01 ± 0.05
head integration_builtins 9.383 ± 0.350 9.091 10.319 1.00
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 9.566 ± 0.071 9.393 9.645 1.00 ± 0.01
head keccak_integration_benchmark 9.521 ± 0.120 9.366 9.738 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.576 ± 0.020 2.553 2.609 1.00
head linear_search 2.609 ± 0.101 2.538 2.798 1.01 ± 0.04
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.732 ± 0.043 1.704 1.851 1.01 ± 0.04
head math_cmp_and_pow_integration_benchmark 1.720 ± 0.044 1.691 1.841 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.689 ± 0.021 1.669 1.742 1.00 ± 0.01
head math_integration_benchmark 1.685 ± 0.012 1.663 1.697 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.411 ± 0.013 1.395 1.433 1.00
head memory_integration_benchmark 1.414 ± 0.012 1.405 1.434 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.797 ± 0.006 1.783 1.806 1.00 ± 0.01
head operations_with_data_structures_benchmarks 1.790 ± 0.008 1.778 1.803 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 587.2 ± 8.8 580.4 608.4 1.00
head pedersen 587.8 ± 4.8 580.2 595.5 1.00 ± 0.02
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 686.1 ± 11.8 678.3 712.3 1.00 ± 0.03
head poseidon_integration_benchmark 683.4 ± 13.8 674.6 721.6 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 2.077 ± 0.046 2.047 2.191 1.01 ± 0.03
head secp_integration_benchmark 2.065 ± 0.028 2.044 2.138 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 680.5 ± 12.4 671.5 714.7 1.00 ± 0.02
head set_integration_benchmark 678.9 ± 11.4 670.5 709.5 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 5.017 ± 0.026 4.983 5.071 1.00
head uint256_integration_benchmark 5.023 ± 0.050 4.969 5.128 1.00 ± 0.01

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/changes_for_using_hint_extention_feature branch from d2b5e95 to 9adf43a Compare November 24, 2024 16:53
@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/changes_for_using_hint_extention_feature branch from 9adf43a to 80879a8 Compare November 24, 2024 16:58
Copy link

codecov bot commented Nov 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.33%. Comparing base (1f71192) to head (db5e47a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1880   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files         102      102           
  Lines       40687    40687           
=======================================
  Hits        39195    39195           
  Misses       1492     1492           

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

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@JulianGCalderon JulianGCalderon left a comment

Choose a reason for hiding this comment

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

Hi @YairVaknin-starkware! Why is the new trait method as_any_mut necessary?

@YairVaknin-starkware
Copy link
Collaborator Author

Hi @YairVaknin-starkware! Why is the new trait method as_any_mut necessary?

Hi, @JulianGCalderon. I managed without it in the end. Removed.

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/changes_for_using_hint_extention_feature branch from ab01a37 to ea28eab Compare December 2, 2024 18:12
@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/changes_for_using_hint_extention_feature branch from ea28eab to db5e47a Compare December 2, 2024 18:13
@gabrielbosio gabrielbosio added this pull request to the merge queue Dec 2, 2024
Merged via the queue into main with commit 8f157a2 Dec 2, 2024
73 checks passed
@gabrielbosio gabrielbosio deleted the yairv/changes_for_using_hint_extention_feature branch December 2, 2024 21:20
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.

5 participants