-
Notifications
You must be signed in to change notification settings - Fork 89
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
∇eachslice
causes UndefRefError
when input array contains references
#807
Comments
Here, Based on that comment, should the Or is there some upstream issue that's only surfacing here? |
I wonder why this code does I'm also not entirely sure what the second method of
The tests for this are not extensive: ChainRules.jl/test/rulesets/Base/indexing.jl Lines 232 to 236 in 30f9b12
|
Unfortunately that doesn't just work, because the output needs to store different So I think EDIT: Ah, and then if I strip the special |
So there's another case where an unexpected situation occurs. Zygote uses I'm wondering if there's a function where the NamedTuple tangents are decomposed into individual values, and the However, given that this occurs, the following appears to at least intercept it and transform it prior to being passed back to ChainRules:
|
ChainRules.jl/src/rulesets/Base/indexing.jl
Lines 264 to 282 in 30f9b12
similar
makesdx
an uninitialized array.dys[i]
is zero, presumably the intent of_zero_fill!(slice)
is to populate the array with zeros._zero_fill!
on an uninitialized array callsmap!(zero, dx, dx)
map!
attempts to mapzero
onto the elements ofdx
, which are#undef
- errorSo this branch never works when the input array has references rather than inline values.
The text was updated successfully, but these errors were encountered: