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

Allow Polyester v0.7 #12

Merged
merged 5 commits into from
Dec 26, 2023
Merged

Allow Polyester v0.7 #12

merged 5 commits into from
Dec 26, 2023

Conversation

ChrisRackauckas
Copy link
Member

No description provided.

@chriselrod
Copy link

Oh, wow, I didn't think anyone actually used the "reserve_per" feature, but your test is using it!
I decided not to bother maintaining it some time ago and took it out. Nothing tested it.
Some non-reserving stub was used but wasn't tested.

If it's useful/used outside of tests, we could add it back.

@ChrisRackauckas
Copy link
Member Author

We can just remove it from the test here.

@chriselrod
Copy link

chriselrod commented Nov 6, 2023

That feature is needed for nesting Polyester to be useful

batch((length(x), max(1,Threads.nthreads()>>1), 2), dx, x) do (dx,x), start, stop
PolyesterForwardDiff.threaded_gradient!(f, view(dx, start%Int:stop%Int), view(x, start%Int:stop%Int), ForwardDiff.Chunk(8))
end;

Once upon a time, this ran nthreads()>>1 (i.e. nthreads() ÷ 2) batches, reserving 2 threads per batch. Reserving meant that each of those PolyesterForwardDiff.threaded_gradient! get two threads rather than stomping on one another/fighting for the total.

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1a7480d) 95.91% compared to head (5d3c116) 95.91%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage   95.91%   95.91%           
=======================================
  Files           1        1           
  Lines          98       98           
=======================================
  Hits           94       94           
  Misses          4        4           

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

@ChrisRackauckas ChrisRackauckas merged commit 7cf756b into main Dec 26, 2023
10 checks passed
@ChrisRackauckas ChrisRackauckas deleted the ChrisRackauckas-patch-1 branch December 26, 2023 13:04
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.

2 participants