Skip to content

Support static arrays with reverse Enzyme#585

Merged
gdalle merged 3 commits intomainfrom
gd/enz_act
Oct 16, 2024
Merged

Support static arrays with reverse Enzyme#585
gdalle merged 3 commits intomainfrom
gd/enz_act

Conversation

@gdalle
Copy link
Copy Markdown
Member

@gdalle gdalle commented Oct 16, 2024

Fixes #558, fixes #583 (but without tests for now, see #586).

Versions

  • Bump DI to v0.6.14

DI extensions

  • Enzyme: some modifications to reverse mode with out-of-place functions
    • For pullback and gradient, guess input and return activity with Enzyme.guess_activity.
    • If the derivative output is nothing, retrieve the values from the provided shadows, otherwise use that output.
    • Deactivate Enzyme's native reverse jacobian because it uses setindex!.

DI tests

  • Enzyme: test on static arrays for out-of-place scenarios $\cap$ out-of-place functions

Related:

Ping @ExpandingMan.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.58%. Comparing base (94f9bc5) to head (4372a4f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #585      +/-   ##
==========================================
+ Coverage   97.54%   97.58%   +0.03%     
==========================================
  Files         110      110              
  Lines        5222     5208      -14     
==========================================
- Hits         5094     5082      -12     
+ Misses        128      126       -2     
Flag Coverage Δ
DI 98.64% <100.00%> (+0.05%) ⬆️
DIT 95.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@gdalle gdalle merged commit d4b17c1 into main Oct 16, 2024
@gdalle gdalle deleted the gd/enz_act branch November 30, 2024 08:50
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.

Enzyme gradient on StaticArrays allocates Test Enzyme with StaticArrays

2 participants