-
-
Notifications
You must be signed in to change notification settings - Fork 211
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
Tweak getindex implementation + test corner cases #547
Conversation
Bump @MikeInnes |
Seems sensible from a quick look. LMK if there's anything in particular you wanted me to check for. |
Nope, I'll merge if you approve. |
@willtebbutt that sounds as an approval to me :) we can merge if you are ok |
bors r+ |
Build succeeded: |
I started getting the error attached below in the tests for my package which uses Zygote+StaticArrays. My StaticArrays version has not changed but I bisected the problem to down to the b3d0ef7 commit on the Zygote side in this PR. I'm totally unfamiliar with what this PR does and also with what that StaticArrays error means. I can say that my package uses Any guidance you guys might offer on how to figure out if this is a problem in my package, in Zygote, or in StaticArrays? Thanks.
|
Hmm yeah, the current implementation assumes mutability of arrays. We could just special-case |
It's a bit unfortunate that Base doesn't have any way to tell mutable from immutable arrays, since that leaves us no real choice but to special case something, or at least to add a new API that new arrays may have to hook into. The best option short term is probably something like: define a |
Okay. I've not got bandwidth to deal with this right now. @MikeInnes do you know if anyone is able to deal with this? |
workaround for FluxML/Zygote.jl#547 (comment)
Dug into this some more, and as you can see in the linked issues here (#686) and in StaticArrays (JuliaArrays/StaticArrays.jl#799), my current thinking is that its actually a problem in StaticArrays, basically because the call to |
Resolves #546