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 modulo builtin constraints #1841

Merged
merged 81 commits into from
Sep 30, 2024
Merged

Fix modulo builtin constraints #1841

merged 81 commits into from
Sep 30, 2024

Conversation

JulianGCalderon
Copy link
Contributor

@JulianGCalderon JulianGCalderon commented Sep 19, 2024

Fix modulo builtin bugs

Closes #1835

Description

This PR changes the modulo builtin to comply with the prover constraints.

It also uploads mod_builtin feature test coverage to codecov.

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.

@JulianGCalderon JulianGCalderon force-pushed the mod-builtin-fix branch 2 times, most recently from 2d22ac5 to 8f1a09f Compare September 23, 2024 15:58
Base automatically changed from dynamic-layout to main September 27, 2024 22:39
@JulianGCalderon JulianGCalderon force-pushed the mod-builtin-fix branch 2 times, most recently from bb4990c to 3da1d2b Compare September 30, 2024 13:33
Copy link

github-actions bot commented Sep 30, 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 ± σ):     30.569 s ±  0.296 s    [User: 29.780 s, System: 0.787 s]
  Range (min … max):   30.360 s … 30.778 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     29.975 s ±  0.054 s    [User: 29.186 s, System: 0.786 s]
  Range (min … max):   29.937 s … 30.013 s    2 runs
 
Summary
  'hyper_threading_pr threads: 1' ran
    1.02 ± 0.01 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 ± σ):     16.900 s ±  0.060 s    [User: 29.712 s, System: 0.801 s]
  Range (min … max):   16.858 s … 16.943 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     16.685 s ±  0.055 s    [User: 29.414 s, System: 0.796 s]
  Range (min … max):   16.646 s … 16.723 s    2 runs
 
Summary
  'hyper_threading_pr threads: 2' ran
    1.01 ± 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.367 s ±  0.071 s    [User: 41.651 s, System: 0.980 s]
  Range (min … max):   11.317 s … 11.417 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     11.598 s ±  0.564 s    [User: 41.018 s, System: 0.978 s]
  Range (min … max):   11.199 s … 11.997 s    2 runs
 
Summary
  'hyper_threading_main threads: 4' ran
    1.02 ± 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 ± σ):     11.613 s ±  0.165 s    [User: 41.810 s, System: 0.967 s]
  Range (min … max):   11.497 s … 11.730 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.575 s ±  0.115 s    [User: 41.522 s, System: 1.012 s]
  Range (min … max):   11.494 s … 11.657 s    2 runs
 
Summary
  'hyper_threading_pr threads: 6' ran
    1.00 ± 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.296 s ±  0.029 s    [User: 42.271 s, System: 0.981 s]
  Range (min … max):   11.275 s … 11.317 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     11.617 s ±  0.251 s    [User: 42.281 s, System: 1.016 s]
  Range (min … max):   11.439 s … 11.794 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.410 s ±  0.269 s    [User: 42.584 s, System: 1.110 s]
  Range (min … max):   11.220 s … 11.600 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.205 s ±  0.005 s    [User: 42.777 s, System: 1.109 s]
  Range (min … max):   11.202 s … 11.209 s    2 runs
 
Summary
  'hyper_threading_pr threads: 16' ran
    1.02 ± 0.02 times faster than 'hyper_threading_main threads: 16'


Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

Copy link
Member

@pefontana pefontana left a comment

Choose a reason for hiding this comment

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

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.

LGTM

@pefontana pefontana added this pull request to the merge queue Sep 30, 2024
Merged via the queue into main with commit 7d19956 Sep 30, 2024
74 checks passed
@pefontana pefontana deleted the mod-builtin-fix branch September 30, 2024 21:36
@JulianGCalderon JulianGCalderon restored the mod-builtin-fix branch October 1, 2024 15:23
@JulianGCalderon JulianGCalderon deleted the mod-builtin-fix branch October 1, 2024 15:29
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.

Mod Builtin Constraints
6 participants