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

Support static arrays with reverse Enzyme #585

Merged
merged 3 commits into from
Oct 16, 2024
Merged

Support static arrays with reverse Enzyme #585

merged 3 commits into from
Oct 16, 2024

Conversation

gdalle
Copy link
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

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
43 checks passed
@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