Skip to content

Compiled autodiff returns more stuff? #1875

@gdalle

Description

@gdalle

I just discovered that autodiff inside and outside of Reactant compilation produce different results:

julia> using Reactant, Enzyme

julia> x = ones(2);

julia> xr = Reactant.to_rarray(x);

julia> autodiff(Reverse, sum, Duplicated(x, zero(x)))
((nothing,),)

julia> @jit autodiff(Reverse, sum, Duplicated(xr, zero(xr)))  # why does this return something different?
((nothing,), nothing)

Found it while working on DI integration in JuliaDiff/DifferentiationInterface.jl#918, it errored because I was using only(autodiff(...))

Metadata

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