-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
Mutable struct bugs #1111
Comments
8 tasks
testing this now [ gradient(x -> abs2(x.x) + 7 * real(x.x), Ref(1+im)) # works correctly, ((x = 9.0 + 2.0im,),)
gradient(x -> abs2(x[].x) + 7 * real(x[].x), Ref(Ref(1+im))) # gives (nothing,)
it looks ok, besides the obvious extra nesting. I'm about to go this road, using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something is currently broken about the handling of mutable structs. One place I can isolate this is the following example, where
Ref(Ref(x))
leads silently to wrong answers:That has been broken since at least 0.6.0. This version, with
Array(Ref(x))
, was not broken in 0.6.20, but currently gives a wrong answer:I presume that #1102 and/or #1103 caused this regression. There were, and are, astonishingly few tests of mutable structs. If anyone has other use cases they think ought to work, and can be compactly summarised to add to tests, that would be extremely helpful.
There are other mysterious bugs which seem like they are related to the handling of mutable structs, for which I don't have a compact example. It's likely that #1109 is related.
Bugs involving only immutable structs are not in scope here. There are some remaining leaks of ChainRules types, every time you fix one another appears... many are fixed by #1104
The text was updated successfully, but these errors were encountered: