We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Apparently reverse-mode jacobian tries to mutate something, and StaticArrays aren't happy:
jacobian
julia> import Enzyme julia> using StaticArrays julia> x = @SVector(ones(2)) 2-element SVector{2, Float64} with indices SOneTo(2): 1.0 1.0 julia> Enzyme.jacobian(Enzyme.Reverse, identity, x) ERROR: setindex!(::SVector{2, Float64}, value, ::Int) is not defined. Hint: Use `MArray` or `SizedArray` to create a mutable static array Stacktrace: [1] error(s::String) @ Base ./error.jl:35 [2] setindex!(a::SVector{2, Float64}, value::Float64, i::Int64) @ StaticArrays ~/.julia/packages/StaticArrays/lZeGV/src/indexing.jl:3 [3] zerosetfn!(x::SVector{2, Float64}, i::Int64, val::Float64) @ Enzyme ~/.julia/packages/Enzyme/R6sE8/src/sugar.jl:11 [4] #130 @ ~/.julia/packages/Enzyme/R6sE8/src/sugar.jl:935 [inlined] [5] ntuple @ ./ntuple.jl:49 [inlined] [6] jacobian(mode::EnzymeCore.ReverseMode{…}, f::typeof(identity), x::SVector{…}; n_outs::Val{…}, chunk::Nothing) @ Enzyme ~/.julia/packages/Enzyme/R6sE8/src/sugar.jl:929 [7] jacobian @ ~/.julia/packages/Enzyme/R6sE8/src/sugar.jl:846 [inlined] [8] #jacobian#129 @ ~/.julia/packages/Enzyme/R6sE8/src/sugar.jl:861 [inlined] [9] jacobian(mode::EnzymeCore.ReverseMode{…}, f::typeof(identity), x::SVector{…}) @ Enzyme ~/.julia/packages/Enzyme/R6sE8/src/sugar.jl:846 [10] top-level scope @ ~/Documents/GitHub/Julia/DifferentiationInterface.jl/DifferentiationInterface/test/Back/Enzyme/playground.jl:8 Some type information was truncated. Use `show(err)` to see complete types.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Apparently reverse-mode
jacobian
tries to mutate something, and StaticArrays aren't happy:The text was updated successfully, but these errors were encountered: