You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix Enzyme HVP returning zeros instead of correct Hessian-vector product
The Enzyme extension's Hessian-vector product (HVP) implementation was
incorrectly using `Enzyme.make_zero(x)` which zeroed out the tangent
direction vector `v`, causing the forward-mode AD to have no direction
to differentiate in. This resulted in HVP always returning zeros.
Fixed by using the correct forward-over-reverse AD approach with the
existing `inner_grad` function, which properly computes H*v by taking
the gradient ∇f(θ) in reverse mode and differentiating it in forward
mode along direction v.
Fixes both in-place (OptimizationFunction{true}) and out-of-place
(OptimizationFunction{false}) versions.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments