-
Notifications
You must be signed in to change notification settings - Fork 6
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
Compatibility with ComponentArrays #152
Labels
bug
Something isn't working
Comments
Yes, I now get the following error: julia> show(err)
1-element ExceptionStack:
Mismatched activity for: %unbox180.fca.1.0.1.insert.pn.extract.0 = phi {} addrspace(10)* [ %unbox180.fca.0.load, %L102 ], [ %getfield24, %L104 ] const val: %getfield24 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox.elt unordered, align 8, !dbg !195, !tbaa !33, !alias.scope !41, !noalias !44, !nonnull !28, !dereferenceable !198, !align !199
value=Unknown object of type Vector{Float64}
llvalue= %getfield24 = load atomic {} addrspace(10)*, {} addrspace(10)* addrspace(11)* %unbox.elt unordered, align 8, !dbg !195, !tbaa !33, !alias.scope !41, !noalias !44, !nonnull !28, !dereferenceable !198, !align !199
You may be using a constant variable as temporary storage for active memory (https://enzyme.mit.edu/julia/stable/faq/#Activity-of-temporary-storage). If not, please open an issue, and either rewrite this variable to not be conditionally active or use Enzyme.API.runtimeActivity!(true) as a workaround for now
Stacktrace:
[1] getproperty
@ ./Base.jl:37
[2] axes
@ ./subarray.jl:490
[3] newindexer
@ ./broadcast.jl:625
[4] extrude
@ ./broadcast.jl:676
[5] preprocess
@ ./broadcast.jl:984
[6] preprocess_args
@ ./broadcast.jl:986
[7] preprocess
@ ./broadcast.jl:983
[8] preprocess_args (repeats 2 times)
@ ./broadcast.jl:986
[9] preprocess
@ ./broadcast.jl:983
[10] preprocess_args
@ ./broadcast.jl:986
[11] preprocess
@ ./broadcast.jl:983
[12] copyto!
@ ./broadcast.jl:1000
[13] copyto!
@ ./broadcast.jl:956
[14] copy
@ ./broadcast.jl:928
[15] materialize
@ ./broadcast.jl:903
[16] conditions_components_aux
@ ./REPL[10]:2
Stacktrace:
[1] iterate
@ ./tuple.jl:72 [inlined]
[2] _any
@ ./reduce.jl:1226 [inlined]
[3] any
@ ./reduce.jl:1235 [inlined]
[4] TupleOrBottom
@ ./promotion.jl:482 [inlined]
[5] eltypes
@ ./broadcast.jl:752 [inlined]
[6] combine_eltypes
@ ./broadcast.jl:758 [inlined]
[7] copy
@ ./broadcast.jl:925 [inlined]
[8] materialize
@ ./broadcast.jl:903 [inlined]
[9] conditions_components_aux
@ ./REPL[10]:2
[10] conditions_components
@ ./REPL[12]:2 [inlined]
[11] ConditionsXNoByproduct
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:12 [inlined]
[12] ConditionsXNoByproduct
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:0 [inlined]
[13] fwddiffejulia_ConditionsXNoByproduct_6994_inner_1wrap
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:0
[14] macro expansion
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:7049 [inlined]
[15] enzyme_call
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6658 [inlined]
[16] ForwardModeThunk
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6538 [inlined]
[17] autodiff
@ ~/.julia/packages/Enzyme/7pzUA/src/Enzyme.jl:437 [inlined]
[18] pushforward
@ ~/.julia/packages/DifferentiationInterface/fMBVB/ext/DifferentiationInterfaceEnzymeExt/forward_onearg.jl:30 [inlined]
[19] pushforward!
@ ~/.julia/packages/DifferentiationInterface/fMBVB/ext/DifferentiationInterfaceEnzymeExt/forward_onearg.jl:57 [inlined]
[20] (::ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}})(res::Vector{Float64}, v::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, α::Float64, β::Float64)
@ ImplicitDifferentiation ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:84
[21] mul!(res::Vector{Float64}, op::LinearOperators.LinearOperator{Float64, Int64, ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}}, DataType, Nothing, Vector{Float64}}, v::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, α::Float64, β::Float64)
@ LinearOperators ~/.julia/packages/LinearOperators/LoNOe/src/operations.jl:29
[22] mul!
@ ~/.julia/packages/LinearOperators/LoNOe/src/operations.jl:40 [inlined]
[23] *
@ ~/.julia/packages/LinearOperators/LoNOe/src/operations.jl:47 [inlined]
[24] #2
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/ext/ImplicitDifferentiationEnzymeExt.jl:30 [inlined]
[25] MappingRF
@ ./reduce.jl:100 [inlined]
[26] afoldl(::Base.MappingRF{ImplicitDifferentiationEnzymeExt.var"#2#6"{LinearOperators.LinearOperator{Float64, Int64, ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}}, DataType, Nothing, Vector{Float64}}}, Base.BottomRF{typeof(hcat)}}, ::Base._InitialValue, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}})
@ Base ./operators.jl:544
[27] _foldl_impl
@ ./reduce.jl:68 [inlined]
[28] foldl_impl
@ ./reduce.jl:48 [inlined]
[29] mapfoldl_impl(f::ImplicitDifferentiationEnzymeExt.var"#2#6"{LinearOperators.LinearOperator{Float64, Int64, ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}}, DataType, Nothing, Vector{Float64}}}, op::typeof(hcat), nt::Base._InitialValue, itr::NTuple{6, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}})
@ Base ./reduce.jl:44
[30] mapfoldl(f::Function, op::Function, itr::NTuple{6, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}}; init::Base._InitialValue)
@ Base ./reduce.jl:175
[31] macro expansion
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:7049 [inlined]
[32] enzyme_call
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6658 [inlined]
[33] ForwardModeThunk
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6538 [inlined]
[34] autodiff
@ ~/.julia/packages/Enzyme/7pzUA/src/Enzyme.jl:437 [inlined]
[35] autodiff(mode::ForwardMode{FFIABI, false}, f::ImplicitFunction{true, typeof(forward_components), typeof(conditions_components), ImplicitDifferentiation.KrylovLinearSolver, Nothing, Nothing}, ::Type{BatchDuplicated}, args::BatchDuplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, 6})
@ Enzyme ~/.julia/packages/Enzyme/7pzUA/src/Enzyme.jl:332
[36] top-level scope
@ REPL[20]:1
[37] eval
@ ./boot.jl:385 [inlined]
[38] eval
@ ./Base.jl:88 [inlined]
[39] repleval(m::Module, code::Expr, ::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/repl.jl:229
[40] (::VSCodeServer.var"#112#114"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/repl.jl:192
[41] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:515
[42] with_logger
@ ./logging.jl:627 [inlined]
[43] (::VSCodeServer.var"#111#113"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/repl.jl:193
[44] #invokelatest#2
@ ./essentials.jl:892 [inlined]
[45] invokelatest(::Any)
@ Base ./essentials.jl:889
[46] (::VSCodeServer.var"#64#65")()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/eval.jl:34 |
Does it work with |
It does not, now I get julia> show(err)
1-element ExceptionStack:
Enzyme execution failed.
Enzyme: Not yet implemented forward for jl_eqtable_get
Stacktrace:
[1] get
@ ./iddict.jl:102
[2] merge
@ ./namedtuple.jl:363
Stacktrace:
[1] get
@ ./iddict.jl:102 [inlined]
[2] merge
@ ./namedtuple.jl:363
[3] make_idx
@ ~/.julia/packages/ComponentArrays/xO4hy/src/componentarray.jl:159
[4] make_carray_args
@ ~/.julia/packages/ComponentArrays/xO4hy/src/componentarray.jl:151 [inlined]
[5] make_carray_args
@ ~/.julia/packages/ComponentArrays/xO4hy/src/componentarray.jl:144 [inlined]
[6] ComponentArray
@ ~/.julia/packages/ComponentArrays/xO4hy/src/componentarray.jl:64
[7] ComponentArray
@ ~/.julia/packages/ComponentArrays/xO4hy/src/componentarray.jl:67 [inlined]
[8] ComponentArray
@ ~/.julia/packages/ComponentArrays/xO4hy/src/componentarray.jl:86 [inlined]
[9] conditions_components
@ ./REPL[9]:3 [inlined]
[10] ConditionsXNoByproduct
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:12 [inlined]
[11] ConditionsXNoByproduct
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:0 [inlined]
[12] fwddiffejulia_ConditionsXNoByproduct_6172_inner_1wrap
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:0
[13] macro expansion
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:7049 [inlined]
[14] enzyme_call
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6658 [inlined]
[15] ForwardModeThunk
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6538 [inlined]
[16] autodiff
@ ~/.julia/packages/Enzyme/7pzUA/src/Enzyme.jl:437 [inlined]
[17] pushforward
@ ~/.julia/packages/DifferentiationInterface/fMBVB/ext/DifferentiationInterfaceEnzymeExt/forward_onearg.jl:30 [inlined]
[18] pushforward!
@ ~/.julia/packages/DifferentiationInterface/fMBVB/ext/DifferentiationInterfaceEnzymeExt/forward_onearg.jl:57 [inlined]
[19] (::ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}})(res::Vector{Float64}, v::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, α::Float64, β::Float64)
@ ImplicitDifferentiation ~/.julia/packages/ImplicitDifferentiation/xV9zO/src/operators.jl:84
[20] mul!(res::Vector{Float64}, op::LinearOperators.LinearOperator{Float64, Int64, ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}}, DataType, Nothing, Vector{Float64}}, v::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, α::Float64, β::Float64)
@ LinearOperators ~/.julia/packages/LinearOperators/LoNOe/src/operations.jl:29
[21] mul!
@ ~/.julia/packages/LinearOperators/LoNOe/src/operations.jl:40 [inlined]
[22] *
@ ~/.julia/packages/LinearOperators/LoNOe/src/operations.jl:47 [inlined]
[23] #2
@ ~/.julia/packages/ImplicitDifferentiation/xV9zO/ext/ImplicitDifferentiationEnzymeExt.jl:30 [inlined]
[24] MappingRF
@ ./reduce.jl:100 [inlined]
[25] afoldl(::Base.MappingRF{ImplicitDifferentiationEnzymeExt.var"#2#6"{LinearOperators.LinearOperator{Float64, Int64, ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}}, DataType, Nothing, Vector{Float64}}}, Base.BottomRF{typeof(hcat)}}, ::Base._InitialValue, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, ::ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}})
@ Base ./operators.jl:544
[26] _foldl_impl
@ ./reduce.jl:68 [inlined]
[27] foldl_impl
@ ./reduce.jl:48 [inlined]
[28] mapfoldl_impl(f::ImplicitDifferentiationEnzymeExt.var"#2#6"{LinearOperators.LinearOperator{Float64, Int64, ImplicitDifferentiation.PushforwardOperator!{ImplicitDifferentiation.ConditionsXNoByproduct{typeof(conditions_components), ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}, Tuple{}, @Kwargs{}}, ADTypes.AutoEnzyme{ForwardMode{FFIABI, false}, Const}, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, DifferentiationInterface.NoPushforwardExtras, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(d = 1:2, e = 3:5)}}}}, DataType, Nothing, Vector{Float64}}}, op::typeof(hcat), nt::Base._InitialValue, itr::NTuple{6, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}})
@ Base ./reduce.jl:44
[29] mapfoldl(f::Function, op::Function, itr::NTuple{6, ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}}; init::Base._InitialValue)
@ Base ./reduce.jl:175
[30] macro expansion
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:7049 [inlined]
[31] enzyme_call
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6658 [inlined]
[32] ForwardModeThunk
@ ~/.julia/packages/Enzyme/7pzUA/src/compiler.jl:6538 [inlined]
[33] autodiff
@ ~/.julia/packages/Enzyme/7pzUA/src/Enzyme.jl:437 [inlined]
[34] autodiff(mode::ForwardMode{FFIABI, false}, f::ImplicitFunction{true, typeof(forward_components), typeof(conditions_components), ImplicitDifferentiation.KrylovLinearSolver, Nothing, Nothing}, ::Type{BatchDuplicated}, args::BatchDuplicated{ComponentVector{Float64, Vector{Float64}, Tuple{Axis{(a = 1:2, b = 3:5, m = 6)}}}, 6})
@ Enzyme ~/.julia/packages/Enzyme/7pzUA/src/Enzyme.jl:332
[35] top-level scope
@ REPL[17]:1
[36] eval
@ ./boot.jl:385 [inlined]
[37] eval
@ ./Base.jl:88 [inlined]
[38] repleval(m::Module, code::Expr, ::String)
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/repl.jl:229
[39] (::VSCodeServer.var"#112#114"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/repl.jl:192
[40] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging ./logging.jl:515
[41] with_logger
@ ./logging.jl:627 [inlined]
[42] (::VSCodeServer.var"#111#113"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/repl.jl:193
[43] #invokelatest#2
@ ./essentials.jl:892 [inlined]
[44] invokelatest(::Any)
@ Base ./essentials.jl:889
[45] (::VSCodeServer.var"#64#65")()
@ VSCodeServer ~/.vscode/extensions/julialang.language-julia-1.105.2/scripts/packages/VSCodeServer/src/eval.jl:34 |
Okay that's what I got too. Any idea what the second one could mean @wsmoses? |
sorry just noticed this, but it says we didn't implement forward mode AD for that julia runtime function, open an issue so we can add? |
Done, see EnzymeAD/Enzyme.jl#1841 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Opening to keep track of the problem in #150
@benjaminfaber can you see what the new bug is for your MWE?
The text was updated successfully, but these errors were encountered: