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

Worksharing-For Optimizations #94

Merged
merged 14 commits into from
Oct 17, 2023
Merged

Worksharing-For Optimizations #94

merged 14 commits into from
Oct 17, 2023

Conversation

computablee
Copy link
Owner

Which issue are you addressing?

Closes #14 and #46. Makes progress towards #16. Fixes an erroneous Ordered_works test. Fixed an issue with chunk size inference on static scheduling.

How have you addressed the issue?

I have implemented a lock-free dynamic scheduler which drastically outperforms the prior scheduler when the chunk size is set to be very small. Additionally, I have applied AggressiveInlining attributes around the core scheduler code, making small improvements to performance here and there. These inlining attributes improve performance of all 3 primary schedulers, as well as some of the code for calculating collapse indices. A lock-free guided scheduler was not implemented after testing, because the amount of lock contentions was decided to be minuscule compared to dynamic, and a lock free scheduler was not likely to make much of a difference, if at all.

How have you tested your patch?

The HeatTransfer benchmark was used on my personal system with an i5-8400T CPU. Proper benchmarking protocols were used, and the results were analyzed constantly throughout optimization. For the non-optimization stuff, unit tests were altered and tested. All unit tests currently pass.

@computablee computablee added bug Something isn't working performance Something needs optimization labels Oct 17, 2023
@computablee computablee linked an issue Oct 17, 2023 that may be closed by this pull request
@computablee computablee linked an issue Oct 17, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (72f6815) 99.54% compared to head (6509181) 99.44%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
- Coverage   99.54%   99.44%   -0.10%     
==========================================
  Files          12       12              
  Lines        1092     1080      -12     
  Branches      101      103       +2     
==========================================
- Hits         1087     1074      -13     
- Partials        5        6       +1     
Files Coverage Δ
DotMP/ForkedRegion.cs 100.00% <ø> (ø)
DotMP/Init.cs 100.00% <100.00%> (ø)
DotMP/Iter.cs 100.00% <100.00%> (ø)
DotMP/Wrappers.cs 100.00% <100.00%> (ø)
DotMP/Parallel.cs 98.72% <66.66%> (-0.22%) ⬇️

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

@computablee computablee merged commit 7edd5c8 into main Oct 17, 2023
15 of 17 checks passed
@computablee computablee deleted the features branch October 17, 2023 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance Something needs optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lock-free Schedule.Dynamic and Schedule.Guided Optimize Schedule.Static
1 participant