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

Handle closures with Enzyme #375

Merged
merged 9 commits into from
Jul 24, 2024
Merged

Handle closures with Enzyme #375

merged 9 commits into from
Jul 24, 2024

Conversation

gdalle
Copy link
Owner

@gdalle gdalle commented Jul 22, 2024

DI extensions

DIT source

  • Implement make_closure(scenario) which creates a closure over x and y buffers (differentiable data) and calls it instead

DIT tests

  • Test the closure scenarios with FiniteDiff (they would fail with ForwardDiff for lack of a Dual cache)

DI tests

  • Add tests over closure scenarios for AutoEnzyme(constant_function=false)

@gdalle gdalle marked this pull request as draft July 22, 2024 17:52
@gdalle gdalle linked an issue Jul 22, 2024 that may be closed by this pull request
@gdalle gdalle changed the title Handle AutoEnzyme(constant_function=true/false) Handle closures with Enzyme Jul 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.64%. Comparing base (5419f9a) to head (9641c7c).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #375      +/-   ##
==========================================
+ Coverage   96.57%   96.64%   +0.06%     
==========================================
  Files          99      100       +1     
  Lines        4876     4918      +42     
==========================================
+ Hits         4709     4753      +44     
+ Misses        167      165       -2     

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

@gdalle
Copy link
Owner Author

gdalle commented Jul 23, 2024

Regardless of which setting ends up being the default in ADTypes, I could use your help on this one @wsmoses

@gdalle gdalle marked this pull request as ready for review July 24, 2024 07:30
@gdalle gdalle merged commit 43bac94 into main Jul 24, 2024
51 checks passed
@gdalle gdalle deleted the gd/constantf branch July 24, 2024 09:55
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.

Make Enzyme dispatches compatible with closures
2 participants