Native AD backend APIs often provide better stability and stronger correctness guarantees than DI's layer around them.
eg: chalk-lab/Mooncake.jl#992 - a frule!!/rrule!! inconsistency in nan_tangent_guard causes forward-mode to return NaNwhere reverse-mode returns 0.0. This kind of edge-case divergence between modes is invisible to DI, which wraps each mode independently.
Broadly the concerns are:
Is there a path toward DI where we can either :
- (a) call native backend APIs more directly where they exist, or
- (b) expose a "native-first" mode that bypasses the wrapper for backends that have the latest stable and correct API?
Native AD backend APIs often provide better stability and stronger correctness guarantees than DI's layer around them.
eg: chalk-lab/Mooncake.jl#992 - a
frule!!/rrule!!inconsistency innan_tangent_guardcauses forward-mode to returnNaNwhere reverse-mode returns0.0. This kind of edge-case divergence between modes is invisible to DI, which wraps each mode independently.Broadly the concerns are:
Is there a path toward DI where we can either :