Right now the direction of the AD-HVP backend is fixed by extension-specific overrides of _hvp_forward_backend / _hvp_closure_backend in src/DEER/DEER.jl. For plain AutoEnzyme(), EnzymeExt rewrites the backend to pin mode=Enzyme.Forward + function_annotation=Enzyme.Const. This works but is per-package special-casing: there's no generic way to ask for "the forward-mode variant of this backend," so e.g. a Mooncake user can't reach the forward-on-grad path
DI opened an issue about this
Right now the direction of the AD-HVP backend is fixed by extension-specific overrides of
_hvp_forward_backend/_hvp_closure_backendinsrc/DEER/DEER.jl. For plainAutoEnzyme(), EnzymeExt rewrites the backend to pinmode=Enzyme.Forward+function_annotation=Enzyme.Const. This works but is per-package special-casing: there's no generic way to ask for "the forward-mode variant of this backend," so e.g. a Mooncake user can't reach the forward-on-grad pathDI opened an issue about this