Skip to content

Improve autodiff docs with DI + Enzyme #3852

@gdalle

Description

@gdalle

In #3836 we discovered that DI causes a segfault when it tries to compute a Hessian with Enzyme.
This is due to JuMP forcing splatted arguments, and Base.splat leading to type instabilities (see EnzymeAD/Enzyme.jl#1942).

I recently made some changes to DI which allow better handling of StaticArrays. If we collect the input into an SVector instead of a Vector, the segfault disappears. Should we add this trick to the tutorial, or at least a warning that Enzyme behaves differently?

Ping @wsmoses

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