-
Notifications
You must be signed in to change notification settings - Fork 57
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
Bad interaction with StaticArrays broadcast #64
Comments
Ah, that's pretty painful. Naively, I guess the easiest solution is to add StaticArrays types here. I think StaticArrays is probably popular enough at this point that JuliaDiff should have a "StaticArraysDiff" package (or whatever) that provides a bunch of StaticArrays-specialized ForwardDiff/ReverseDiff methods. See also JuliaDiff/ForwardDiff.jl#208 (comment). Even beyond StaticArrays, though, I imagine it would be pretty common for external array types to introduce ambiguities w.r.t. ReverseDiff methods. We should come up with a convenient process by which users can dynamically perform the equivalent of adding such array types to the aforementioned list and generating new methods. It seems to me like this kind of compatibility problem would arise any time somebody tries to compose two sufficiently complex/specialized non-Base array types. I wonder how (or if) other folks have resolved it...might make a good post for Discourse. |
Thanks for the quick response and workaround. I'll post on Discourse, but first I'll play around with ReverseDiff a little more. |
Just got back to this after working on some other stuff. I realize now that the bigger problem with StaticArrays and ReverseDiff is that |
I was trying out using ReverseDiff with my package, which relies heavily on StaticArrays. Unfortunately, I ran into an issue with
broadcast
:results in the following ambiguity error on 0.6 with StaticArrays 0.0.4 and ReverseDiff 0.1.2:
The relevant methods are:
How do you think this should be resolved?
The text was updated successfully, but these errors were encountered: