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

ForwardDiff over anything - prepare inner gradient for HVP #385

Merged
merged 18 commits into from
Jul 29, 2024
Merged

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Jul 27, 2024

DI source

  • Move, rename and (partially) document functors Gradient and PushforwardFixedSeed

DI extensions

  • ForwardDiff: add secondorder.jl file allowing preparation of the inner gradient within an HVP. The secret is to figure out the dual type that will be passed during the pushforward, and to give this type to prepare_gradient. This requires fixing the ForwardDiff tag so that it doesn't depend on the gradient closure (which results in a circular dependency, see Preparation for second order #86).

@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2024

Codecov Report

Attention: Patch coverage is 96.92308% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.62%. Comparing base (1c35de5) to head (f3264a5).

Files Patch % Lines
...rentiationInterface/src/first_order/pushforward.jl 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   96.59%   96.62%   +0.03%     
==========================================
  Files         101      102       +1     
  Lines        4929     4974      +45     
==========================================
+ Hits         4761     4806      +45     
  Misses        168      168              

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

@gdalle gdalle changed the title ForwardDiff over ReverseDiff- prepare HVP tape ForwardDiff over ReverseDiff - prepare HVP tape Jul 28, 2024
@gdalle gdalle changed the title ForwardDiff over ReverseDiff - prepare HVP tape ForwardDiff over anything - prepare inner gradient for HVP Jul 29, 2024
@gdalle gdalle merged commit beea1d0 into main Jul 29, 2024
51 checks passed
@gdalle gdalle deleted the gd/forrev branch July 29, 2024 09:36
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