Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit ed73696

Browse files
committed
Fix AutoZygote cache initialization
1 parent 3516962 commit ed73696

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/differentiation/jaches_products.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ function HesVec(f, u::AbstractArray, p = nothing, t = nothing; autodiff = AutoFo
277277
cache1 = Dual{
278278
typeof(ForwardDiff.Tag(DeivVecTag(),eltype(u))), eltype(u), 1
279279
}.(u, ForwardDiff.Partials.(tuple.(u)))
280-
cache2 = copy(u)
280+
cache2 = copy(cache1)
281281

282282
(cache1, cache2), autoback_hesvec, autoback_hesvec!
283283
else

0 commit comments

Comments
 (0)