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

pass shadow closure incase f is a closure #962

Merged
merged 18 commits into from
Dec 29, 2023

Conversation

ArbitRandomUser
Copy link
Contributor

@ArbitRandomUser ArbitRandomUser commented Dec 27, 2023

WIP ... will check these later

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

passing closures to enzyme require enzyme to have shadows for captured variables ,
Enzyme.make_zero allows one to do the same.

@ArbitRandomUser ArbitRandomUser changed the title pass shaddow variables incase f is a closure pass shadow closure incase f is a closure Dec 27, 2023
test/Project.toml Outdated Show resolved Hide resolved
@ChrisRackauckas
Copy link
Member

Yeah the finite differencing error is high. This is the max difference between Calculus and ForwardDiff:

julia> maximum(refdp - refdp2)
5.0608451903078056e-5

@ChrisRackauckas ChrisRackauckas merged commit dd9ff79 into SciML:master Dec 29, 2023
12 of 14 checks passed
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