Skip to content

Missing new memory intrinsic on v1.11: No augmented forward pass found for jl_genericmemory_copyto #2077

Open
@ChrisRackauckas

Description

Fairly tame MWE:

using Enzyme
u = [rand(2),rand(2)]
_u = Enzyme.zero(u)
B = rand(2,2)
_B = rand(2,2)
I = ([1,2],Colon())


function f(B, A)
	B .= stack(getindex.(u[last(I)], tuple.(Base.front(I))...))
	nothing
end

f(B,u)

Enzyme.autodiff(Reverse, f, Duplicated(B, _B), Duplicated(u, _u))
ERROR: 
No augmented forward pass found for jl_genericmemory_copyto
 at context:   call void @jl_genericmemory_copyto({} addrspace(10)* noundef nonnull %11, i64 %28, {} addrspace(10)* noundef %40, i64 %49, i64 %8) #10, !dbg !90

Stacktrace:
 [1] unsafe_copyto!
   @ ./genericmemory.jl:117
 [2] unsafe_copyto!
   @ ./array.jl:284
 [3] getindex
   @ ./array.jl:941


Stacktrace:
  [1] unsafe_copyto!
    @ ./genericmemory.jl:117 [inlined]
  [2] unsafe_copyto!
    @ ./array.jl:284 [inlined]
  [3] getindex
    @ ./array.jl:941 [inlined]
  [4] augmented_julia_getindex_55511wrap
    @ ./array.jl:0
  [5] macro expansion
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8305 [inlined]
  [6] enzyme_call
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:7868 [inlined]
  [7] AugmentedForwardThunk
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:7705 [inlined]
  [8] runtime_generic_augfwd(activity::Type{…}, runtimeActivity::Val{…}, width::Val{…}, ModifiedBetween::Val{…}, RT::Val{…}, f::typeof(getindex), df::Nothing, primal_1::Vector{…}, shadow_1_1::Vector{…}, primal_2::Colon, shadow_2_1::Colon)
    @ Enzyme.Compiler ~/.julia/packages/Enzyme/RvNgp/src/rules/jitrules.jl:483
  [9] f
    @ ~/Desktop/test.jl:103 [inlined]
 [10] diffejulia_f_54913wrap
    @ ~/Desktop/test.jl:0
 [11] macro expansion
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:8305 [inlined]
 [12] enzyme_call
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:7868 [inlined]
 [13] CombinedAdjointThunk
    @ ~/.julia/packages/Enzyme/RvNgp/src/compiler.jl:7641 [inlined]
 [14] autodiff
    @ ~/.julia/packages/Enzyme/RvNgp/src/Enzyme.jl:491 [inlined]
 [15] autodiff
    @ ~/.julia/packages/Enzyme/RvNgp/src/Enzyme.jl:537 [inlined]
 [16] autodiff(::ReverseMode{…}, ::typeof(f), ::Duplicated{…}, ::Duplicated{…})
    @ Enzyme ~/.julia/packages/Enzyme/RvNgp/src/Enzyme.jl:504
 [17] top-level scope
    @ ~/Desktop/test.jl:109
Some type information was truncated. Use `show(err)` to see complete types.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions