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

Missing dynamic layout features #1838

Merged
merged 120 commits into from
Oct 4, 2024
Merged

Missing dynamic layout features #1838

merged 120 commits into from
Oct 4, 2024

Conversation

JulianGCalderon
Copy link
Contributor

@JulianGCalderon JulianGCalderon commented Sep 17, 2024

Missing dynamic layout features

Solves #1834

Features

  • dynamic memory units per step. This attributes used to be a fixed constant MEMORY_UNITS_PER_STEP. This PR changes this to use a CairoLayout attribute instead
  • negative log diluted units per step. I added an attribute to DilutedPoolInstanceDef that indicates if log_units_per_step is negative or positive.
  • low ratio builtins with ratio den. Builtins that can have a low ratio now use the LowRatio struct, which has a denominator and a numerator.
  • dynamic cpu component step. Currently not used

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 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 ± σ):     29.874 s ±  0.003 s    [User: 29.138 s, System: 0.735 s]
  Range (min … max):   29.872 s … 29.876 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 1
  Time (mean ± σ):     30.221 s ±  0.060 s    [User: 29.450 s, System: 0.768 s]
  Range (min … max):   30.179 s … 30.264 s    2 runs
 
Summary
  'hyper_threading_main threads: 1' ran
    1.01 ± 0.00 times faster than 'hyper_threading_pr 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.844 s ±  0.203 s    [User: 29.581 s, System: 0.764 s]
  Range (min … max):   16.700 s … 16.987 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 2
  Time (mean ± σ):     16.819 s ±  0.011 s    [User: 29.505 s, System: 0.795 s]
  Range (min … max):   16.811 s … 16.827 s    2 runs
 
Summary
  'hyper_threading_pr threads: 2' ran
    1.00 ± 0.01 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.717 s ±  0.372 s    [User: 41.089 s, System: 0.960 s]
  Range (min … max):   11.454 s … 11.980 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 4
  Time (mean ± σ):     11.506 s ±  0.346 s    [User: 42.111 s, System: 0.967 s]
  Range (min … max):   11.261 s … 11.750 s    2 runs
 
Summary
  'hyper_threading_pr threads: 4' ran
    1.02 ± 0.04 times faster than 'hyper_threading_main 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.730 s ±  0.216 s    [User: 41.444 s, System: 0.936 s]
  Range (min … max):   11.577 s … 11.882 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 6
  Time (mean ± σ):     11.345 s ±  0.025 s    [User: 42.368 s, System: 0.956 s]
  Range (min … max):   11.328 s … 11.363 s    2 runs
 
Summary
  'hyper_threading_pr threads: 6' ran
    1.03 ± 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.506 s ±  0.129 s    [User: 41.753 s, System: 0.935 s]
  Range (min … max):   11.416 s … 11.597 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 8
  Time (mean ± σ):     11.467 s ±  0.205 s    [User: 42.463 s, System: 0.936 s]
  Range (min … max):   11.323 s … 11.612 s    2 runs
 
Summary
  'hyper_threading_pr threads: 8' ran
    1.00 ± 0.02 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.328 s ±  0.248 s    [User: 42.327 s, System: 1.032 s]
  Range (min … max):   11.152 s … 11.503 s    2 runs
 
Benchmark 2: hyper_threading_pr threads: 16
  Time (mean ± σ):     11.394 s ±  0.317 s    [User: 42.692 s, System: 1.028 s]
  Range (min … max):   11.170 s … 11.619 s    2 runs
 
Summary
  'hyper_threading_main threads: 16' ran
    1.01 ± 0.04 times faster than 'hyper_threading_pr threads: 16'


@JulianGCalderon JulianGCalderon force-pushed the dynamic-layout-2 branch 2 times, most recently from b0242c4 to 515063a Compare October 1, 2024 16:41
@JulianGCalderon JulianGCalderon marked this pull request as ready for review October 1, 2024 18:44
CHANGELOG.md Outdated Show resolved Hide resolved
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.

Nice one @JulianGCalderon !!!
Also, can you add a little documentation in the readme explaining how to use the dynamic layout

@pefontana pefontana added this pull request to the merge queue Oct 4, 2024
Merged via the queue into main with commit 3fb0344 Oct 4, 2024
73 checks passed
@pefontana pefontana deleted the dynamic-layout-2 branch October 4, 2024 15:56
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.

6 participants