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
The reason is that I use zero in DI.basis to construct basis vectors, and zero(x) doesn't necessarily have the same type as x. Subsequently, when I convert dx for Enzyme to ensure that Duplicated gets two arguments of the same type, I get an error.
julia> x =view(ones(2), 1:2)
2-element view(::Vector{Float64}, 1:2) with eltype Float64:1.01.0
julia>zero(x)
2-element Vector{Float64}:0.00.0
julia>convert(typeof(x), zero(x))
ERROR: MethodError: Cannot `convert` an object of type Vector{Float64} to an object of type SubArray{Float64, 1, Vector{Float64}, Tuple{UnitRange{Int64}}, true}
The reason is that I use
zero
inDI.basis
to construct basis vectors, andzero(x)
doesn't necessarily have the same type asx
. Subsequently, when I convertdx
for Enzyme to ensure thatDuplicated
gets two arguments of the same type, I get an error.Detected in SciML/NonlinearSolve.jl#476 (comment)
Enzyme.onehot
usessimilar
so it has the same problem.Related:
The text was updated successfully, but these errors were encountered: