Open vchuravy opened 1 week ago
After #1780 I now hit this also in ForwardMode
ERROR: AssertionError: x.indices == dx.indices
Stacktrace:
[1] Duplicated
@ ~/.julia/packages/EnzymeCore/jSKtE/src/EnzymeCore.jl:69 [inlined]
[2] Duplicated
@ ~/.julia/packages/EnzymeCore/jSKtE/src/EnzymeCore.jl:68 [inlined]
[3] runtime_generic_fwd(activity::Type{…}, width::Val{…}, RT::Val{…}, f::typeof(getindex), df::Nothing, primal_1::SubArray{…}, shadow_1_1::SubArray{…}, primal_2::Colon, shadow_2_1::Nothing)
@ Enzyme.Compiler ~/.julia/packages/Enzyme/TiboG/src/rules/jitrules.jl:135
[4] Res!
@ ~/src/snippets/chmy_ad/example_2_ForwardDiff.jl:51 [inlined]
[5] Res!
@ ~/src/snippets/chmy_ad/example_2_ForwardDiff.jl:0 [inlined]
[6] fwddiffejulia_Res__19223_inner_1wrap
@ ~/src/snippets/chmy_ad/example_2_ForwardDiff.jl:0
[7] macro expansion
@ ~/.julia/packages/Enzyme/TiboG/src/compiler.jl:7187 [inlined]
[8] enzyme_call
@ ~/.julia/packages/Enzyme/TiboG/src/compiler.jl:6794 [inlined]
[9] ForwardModeThunk
@ ~/.julia/packages/Enzyme/TiboG/src/compiler.jl:6674 [inlined]
[10] autodiff
@ ~/.julia/packages/Enzyme/TiboG/src/Enzyme.jl:437 [inlined]
[11] autodiff(::ForwardMode{…}, ::typeof(Res!), ::Type{…}, ::Duplicated{…}, ::Duplicated{…}, ::Const{…}, ::Const{…}, ::Const{…}, ::Const{…}, ::Const{…})
@ Enzyme ~/.julia/packages/Enzyme/TiboG/src/Enzyme.jl:332
[12] top-level scope
@ ~/src/snippets/chmy_ad/example_2_ForwardDiff.jl:103
Some type information was truncated. Use `show(err)` to see complete types.
@wsmoses said:
But the call to Enzyme is:
autodiff(Enzyme.Reverse, Res!, Const, Duplicated(Rvec, dR), Duplicated(Cvec, dC), Const(C_bc), Const(Χ), Const(arch), Const(grid), Const(launch))
and