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

Fix_compilation_of_stwo_exclusive_programs_in_makefile #1963

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YairVaknin-starkware
Copy link
Collaborator

TITLE

Fix Compilation of Stwo Exclusive Programs in Makefile

Description

Ensures programs in stwo_exclusive_programs dir are compiled by 'make test`.

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.

Copy link

github-actions bot commented Feb 18, 2025

**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 ± σ):     28.341 s ±  0.018 s    [User: 27.541 s, System: 0.798 s]
  Range (min … max):   28.329 s … 28.354 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     27.424 s ±  0.011 s    [User: 26.642 s, System: 0.780 s]
  Range (min … max):   27.417 s … 27.432 s    2 runs
 
Summary
  hyper_threading_pr threads: 1 ran
    1.03 ± 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 ± σ):     15.696 s ±  0.017 s    [User: 27.659 s, System: 0.839 s]
  Range (min … max):   15.684 s … 15.707 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     15.298 s ±  0.039 s    [User: 26.805 s, System: 0.851 s]
  Range (min … max):   15.270 s … 15.325 s    2 runs
 
Summary
  hyper_threading_pr threads: 2 ran
    1.03 ± 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 ± σ):     11.112 s ±  0.036 s    [User: 40.975 s, System: 0.993 s]
  Range (min … max):   11.086 s … 11.137 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     11.143 s ±  0.338 s    [User: 39.778 s, System: 1.039 s]
  Range (min … max):   10.904 s … 11.382 s    2 runs
 
Summary
  hyper_threading_main threads: 4 ran
    1.00 ± 0.03 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 ± σ):     11.522 s ±  0.197 s    [User: 40.880 s, System: 1.083 s]
  Range (min … max):   11.383 s … 11.661 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.053 s ±  0.136 s    [User: 39.688 s, System: 1.023 s]
  Range (min … max):   10.957 s … 11.149 s    2 runs
 
Summary
  hyper_threading_pr threads: 6 ran
    1.04 ± 0.02 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.110 s ±  0.131 s    [User: 41.253 s, System: 1.126 s]
  Range (min … max):   11.017 s … 11.203 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     11.052 s ±  0.091 s    [User: 40.573 s, System: 1.061 s]
  Range (min … max):   10.988 s … 11.116 s    2 runs
 
Summary
  hyper_threading_pr threads: 8 ran
    1.01 ± 0.01 times faster than hyper_threading_main 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.087 s ±  0.177 s    [User: 41.674 s, System: 1.187 s]
  Range (min … max):   10.962 s … 11.212 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     10.826 s ±  0.062 s    [User: 40.857 s, System: 1.175 s]
  Range (min … max):   10.782 s … 10.870 s    2 runs
 
Summary
  hyper_threading_pr threads: 16 ran
    1.02 ± 0.02 times faster than hyper_threading_main threads: 16


Copy link

github-actions bot commented Feb 18, 2025

Benchmark Results for unmodified programs 🚀

Command Mean [s] Min [s] Max [s] Relative
base big_factorial 2.212 ± 0.014 2.198 2.250 1.00 ± 0.01
head big_factorial 2.208 ± 0.012 2.191 2.226 1.00
Command Mean [s] Min [s] Max [s] Relative
base big_fibonacci 2.167 ± 0.006 2.158 2.177 1.00 ± 0.01
head big_fibonacci 2.161 ± 0.012 2.145 2.182 1.00
Command Mean [s] Min [s] Max [s] Relative
base blake2s_integration_benchmark 8.114 ± 0.055 8.018 8.216 1.00
head blake2s_integration_benchmark 8.222 ± 0.136 8.073 8.492 1.01 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base compare_arrays_200000 2.284 ± 0.008 2.274 2.297 1.00
head compare_arrays_200000 2.288 ± 0.017 2.260 2.323 1.00 ± 0.01
Command Mean [s] Min [s] Max [s] Relative
base dict_integration_benchmark 1.494 ± 0.011 1.481 1.522 1.00 ± 0.01
head dict_integration_benchmark 1.491 ± 0.013 1.480 1.514 1.00
Command Mean [s] Min [s] Max [s] Relative
base field_arithmetic_get_square_benchmark 1.281 ± 0.007 1.270 1.289 1.00
head field_arithmetic_get_square_benchmark 1.303 ± 0.021 1.274 1.351 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base integration_builtins 8.213 ± 0.139 8.080 8.584 1.00
head integration_builtins 8.344 ± 0.082 8.156 8.424 1.02 ± 0.02
Command Mean [s] Min [s] Max [s] Relative
base keccak_integration_benchmark 8.510 ± 0.178 8.343 8.823 1.00 ± 0.02
head keccak_integration_benchmark 8.499 ± 0.112 8.367 8.616 1.00
Command Mean [s] Min [s] Max [s] Relative
base linear_search 2.280 ± 0.020 2.260 2.320 1.01 ± 0.01
head linear_search 2.268 ± 0.010 2.258 2.290 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_cmp_and_pow_integration_benchmark 1.573 ± 0.014 1.562 1.614 1.01 ± 0.01
head math_cmp_and_pow_integration_benchmark 1.563 ± 0.006 1.551 1.572 1.00
Command Mean [s] Min [s] Max [s] Relative
base math_integration_benchmark 1.529 ± 0.007 1.519 1.546 1.00 ± 0.01
head math_integration_benchmark 1.523 ± 0.006 1.515 1.535 1.00
Command Mean [s] Min [s] Max [s] Relative
base memory_integration_benchmark 1.272 ± 0.017 1.254 1.304 1.01 ± 0.01
head memory_integration_benchmark 1.262 ± 0.003 1.258 1.268 1.00
Command Mean [s] Min [s] Max [s] Relative
base operations_with_data_structures_benchmarks 1.639 ± 0.013 1.631 1.674 1.00
head operations_with_data_structures_benchmarks 1.642 ± 0.015 1.628 1.666 1.00 ± 0.01
Command Mean [ms] Min [ms] Max [ms] Relative
base pedersen 545.8 ± 0.9 544.6 547.5 1.00 ± 0.00
head pedersen 545.7 ± 0.9 544.5 547.6 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base poseidon_integration_benchmark 643.9 ± 5.3 634.3 651.1 1.00 ± 0.01
head poseidon_integration_benchmark 641.1 ± 4.7 635.4 649.1 1.00
Command Mean [s] Min [s] Max [s] Relative
base secp_integration_benchmark 1.916 ± 0.023 1.902 1.980 1.00 ± 0.01
head secp_integration_benchmark 1.910 ± 0.011 1.893 1.926 1.00
Command Mean [ms] Min [ms] Max [ms] Relative
base set_integration_benchmark 671.7 ± 1.6 669.9 675.5 1.05 ± 0.01
head set_integration_benchmark 641.7 ± 3.1 638.0 647.9 1.00
Command Mean [s] Min [s] Max [s] Relative
base uint256_integration_benchmark 4.457 ± 0.036 4.411 4.533 1.00
head uint256_integration_benchmark 4.505 ± 0.042 4.433 4.552 1.01 ± 0.01

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/fix_compilation_of_stwo_exclusive_programs_in_makefile branch from 34830c8 to 8dd8838 Compare February 18, 2025 15:20
@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/fix_compilation_of_stwo_exclusive_programs_in_makefile branch 2 times, most recently from 82e58dc to ada839d Compare February 18, 2025 16:04
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.41%. Comparing base (7a97bed) to head (e6936c2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1963      +/-   ##
==========================================
+ Coverage   96.39%   96.41%   +0.02%     
==========================================
  Files         102      102              
  Lines       41566    41861     +295     
==========================================
+ Hits        40068    40362     +294     
- Misses       1498     1499       +1     

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

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/fix_compilation_of_stwo_exclusive_programs_in_makefile branch from ada839d to 1f4429c Compare February 18, 2025 18:52
Copy link
Contributor

@FrancoGiachetta FrancoGiachetta 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, I realized the .json files from the stwo programs are not being deleted when doin make clean. This line under the clean receipt should do the trick:

rm -f $(STWO_EXCLUSIVE_DIR)/%.json

@YairVaknin-starkware YairVaknin-starkware force-pushed the yairv/fix_compilation_of_stwo_exclusive_programs_in_makefile branch from 1f4429c to e6936c2 Compare February 23, 2025 16:28
@YairVaknin-starkware
Copy link
Collaborator Author

Hi @YairVaknin-starkware, I realized the .json files from the stwo programs are not being deleted when doin make clean. This line under the clean receipt should do the trick:

rm -f $(STWO_EXCLUSIVE_DIR)/%.json

Hi,
Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pipelines This PR/issue is exclusively about improving our CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants