You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an attempt to isolate what is happening in JuliaDiff/ChainRulesCore.jl#649
as I don't think that one is ChainRulesCore's fault
Basically what we see is:
julia>eltype(ones(Complex,100,100)')
Complex
julia>using ChainRulesCore
julia>eltype(ones(Complex,100,100)')
Any
This does not occur with concretely typed Matrix{ComplexF64}
I am pretty sure this is because Adjoint{Matrix{Complex}} actually makes an invalid use of promote_ophere
according to its the promote_op doc sting
and this is what fails
Note that even if the new methods successfully inferred as Complex, there would still be too many of them.
But even if this effect of loading ChainRulesCore on inference is somewhat unfortunate, having adjoint use promote_op in this way is quite problematic. However, our options are limited: We don't want to compute adjoint of every element here, but need to determine the type(s) resulting from doing so.
This is an attempt to isolate what is happening in JuliaDiff/ChainRulesCore.jl#649
as I don't think that one is ChainRulesCore's fault
Basically what we see is:
This does not occur with concretely typed
Matrix{ComplexF64}
I am pretty sure this is because
Adjoint{Matrix{Complex}}
actually makes an invalid use ofpromote_op
hereaccording to its the promote_op doc sting
and this is what fails
The text was updated successfully, but these errors were encountered: