Skip to content

Questions about AD support #547

@gdalle

Description

@gdalle

I have a few questions about AD in Turing and this docs page.

For ForwardDiff, pass adtype=AutoForwardDiff(; chunksize) to the sampler constructor. A chunksize of 0 permits the chunk size to be automatically determined.

In ADTypes, the default chunksize is nothing, why adopt a different convention here? If you end up using DifferentiationInterface, chunksize=0 will throw an error on every input.

An additional argument can be provided to AutoReverseDiff to specify whether to to compile the tape only once and cache it for later use (false by default, which means no caching tape). [...] Compiled tapes should only be used if you are absolutely certain that the computation doesn’t change between different executions of your model.

If I understand correctly, this holds for all tapes, compiled or not?

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