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

Preparation of pushforward, pullback and hvp for same point x #255

Merged
merged 17 commits into from
May 14, 2024

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented May 13, 2024

  • Bump DI and DIT to v0.4.0

Core

BREAKING

  • Remove split reverse mode with value_and_pullback_split

NON-BREAKING

  • Add functions for preparation of a product-based differentiation operator when the point x doesn't change:
    • prepare_pushforward_same_point
    • prepare_pullback_same_point
    • prepare_hvp_same_point
  • Make same-point preparation fall back on normal preparation
  • Use same-point preparation step after normal preparation in Jacobian and Hessian, both sparse and dense
  • Avoid running actual differentiation in the preparation of a sparse Jacobian / Hessian
  • Use prepare_pullback_same_point when pushforward falls back on pullback
  • Add @eval fallbacks for AutoSparse

Tests

  • Test correctness for both extras and extras_same
  • Remove mysimilar_random and replace it with mycopy_random for test initializations (the latter preserves SArray, the former spits out a MArray instead)

Extensions

  • Adjust DifferentiateWith in the ChainRules extension
  • Replace split reverse mode with prepare_pullback_same_point for ChainRules, Tracker and Zygote
  • Use similar when initializing storage in ForwardDiff's pushforward, so that SArray is supported

@codecov-commenter
Copy link

codecov-commenter commented May 13, 2024

Codecov Report

Attention: Patch coverage is 87.78135% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 95.13%. Comparing base (8843031) to head (5cb4d12).

Files Patch % Lines
...ferentiationInterfaceTest/src/tests/correctness.jl 76.54% 38 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #255      +/-   ##
==========================================
- Coverage   95.44%   95.13%   -0.31%     
==========================================
  Files          74       74              
  Lines        3948     3929      -19     
==========================================
- Hits         3768     3738      -30     
- Misses        180      191      +11     

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

@adrhill adrhill mentioned this pull request May 13, 2024
@gdalle gdalle merged commit 65e449d into main May 14, 2024
7 checks passed
@gdalle gdalle deleted the gd/prep_single branch May 14, 2024 07:58
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