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

Improve Enzyme in forward mode with chunk size #186

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Apr 17, 2024

Core

  • Add a pick_chunksize heuristic lifted from ForwardDiff.jl

Extensions

Tests

  • Add AutoEnzyme(Enzyme.Forward) to the type-stable backends

@gdalle gdalle marked this pull request as ready for review April 17, 2024 08:38
@gdalle gdalle linked an issue Apr 17, 2024 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Apr 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.75%. Comparing base (de94031) to head (8a84314).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #186      +/-   ##
==========================================
+ Coverage   93.60%   93.75%   +0.15%     
==========================================
  Files          66       67       +1     
  Lines        3222     3237      +15     
==========================================
+ Hits         3016     3035      +19     
+ Misses        206      202       -4     

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

@gdalle gdalle merged commit 06841e0 into main Apr 17, 2024
5 checks passed
@gdalle gdalle deleted the gd/enzyme_jac branch April 17, 2024 09:00
@adrhill
Copy link
Collaborator

adrhill commented Apr 17, 2024

In the long run, would it make sense to add a backend argument for dispatch to pick_chunksize? Or is the heuristic generally valid?

@gdalle
Copy link
Member Author

gdalle commented Apr 17, 2024

It can't hurt. But at the moment only ForwardDiff and Enzyme handle chunks, and based on the slack discussion the optimal chunk length is about the same for both (circa SIMD length)

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 utilities are type unstable in forward mode
3 participants