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 mutation for forward mode #189

Closed
2 tasks
oxinabox opened this issue Jul 25, 2023 · 0 comments · Fixed by #219
Closed
2 tasks

Support mutation for forward mode #189

oxinabox opened this issue Jul 25, 2023 · 0 comments · Fixed by #219

Comments

@oxinabox
Copy link
Member

oxinabox commented Jul 25, 2023

We currently have partial support for mutation in forwards mode, (I think)
I believe mutating arrays works, but mutating structs does not.

We need two things for this:

  • MutableTangent ChainRulesCore.jl#105 a MutableTangent type
  • To never automatically insert ZeroTangent for mutable structs, and instead us a MutableTangent with no fields/all fields set to ZeroTangents (unless those fields themselves are mutable structs)

Mutation in forwards mode is much easier than reverse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant