Skip to content

Unprepared operators for ForwardDiff - #414

Merged
gdalle merged 1 commit into
mainfrom
gd/unprepared_forwarddiff
Aug 18, 2024
Merged

Unprepared operators for ForwardDiff#414
gdalle merged 1 commit into
mainfrom
gd/unprepared_forwarddiff

Conversation

@gdalle

@gdalle gdalle commented Aug 18, 2024

Copy link
Copy Markdown
Member

Versions

  • Bump DI to v0.5.14

Extensions

  • ForwardDiff: Add direct implementations for unprepared operators that do not call preparation first (see StaticArrays woes #413).

@codecov-commenter

codecov-commenter commented Aug 18, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.71%. Comparing base (9182912) to head (fb0090c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #414      +/-   ##
==========================================
+ Coverage   96.67%   96.71%   +0.03%     
==========================================
  Files         103      103              
  Lines        4906     4962      +56     
==========================================
+ Hits         4743     4799      +56     
  Misses        163      163              

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

@ExpandingMan

Copy link
Copy Markdown
Contributor

For posterity note that it should probably be considered a bug in ForwardDiff that these are needed, since most of the inefficiency in the prepared methods seems to be coming from type instability on the part of ForwardDiff, but considering that a fix for that is not likely to come very soon this is certainly nice to have.

@gdalle
gdalle merged commit 8077dce into main Aug 18, 2024
@gdalle
gdalle deleted the gd/unprepared_forwarddiff branch August 18, 2024 17:00
@gdalle

gdalle commented Aug 18, 2024

Copy link
Copy Markdown
Member Author

Apparently, ForwardDiff's StaticArrays extension just ignores the config object which I create during preparation, and whose preparation causes type instability. With these new unprepared functions we should hit the right shortcuts

@ExpandingMan ExpandingMan mentioned this pull request Aug 18, 2024
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.

3 participants