Skip to content

allow generating DIT.Scenario reference results with a given backend #834

@penelopeysm

Description

@penelopeysm

In a lot of our AD testing stuff we want to compare the results against some backend (ideally FiniteDifferences, in practice often ForwardDiff). I wonder if it might be a nice ergonomic improvement to be able to specify that directly somehow when constructing a scenario? i.e. make a one-liner for what's currently

ref_grad = DifferentiationInterface.gradient(f, reference_adtype, x)
scen = Scenario{:gradient,:out}(f, x; res1=ref_grad)

It's certainly easy for me to define a wrapper function but I'm lazy :-)

Although now I look at it, it seems like that might entail some awkward design choices for in-place operations like deepcopying x.

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