diff --git a/src/derivative_wrappers.jl b/src/derivative_wrappers.jl index 55d84dc6d..07c449318 100644 --- a/src/derivative_wrappers.jl +++ b/src/derivative_wrappers.jl @@ -680,7 +680,7 @@ function _vecjacobian!(dλ, y, λ, p, t, S::TS, isautojacvec::EnzymeVJP, dgrad, ytmp = _tmp5 end - tmp1 .= 0 # should be removed for dλ + Enzyme.make_zero!(tmp1) # should be removed for dλ ytmp .= y #if dgrad !== nothing @@ -698,7 +698,7 @@ function _vecjacobian!(dλ, y, λ, p, t, S::TS, isautojacvec::EnzymeVJP, dgrad, #if dy !== nothing # tmp3 = dy #else - tmp3 .= 0 + Enzyme.make_zero!(tmp3) #end vec(tmp4) .= vec(λ) diff --git a/src/gauss_adjoint.jl b/src/gauss_adjoint.jl index f1d13b03d..717396059 100644 --- a/src/gauss_adjoint.jl +++ b/src/gauss_adjoint.jl @@ -497,7 +497,7 @@ function vec_pjac!(out, λ, y, t, S::GaussIntegrand) tmp3, tmp4, tmp6 = paramjac_config vtmp4 = vec(tmp4) vtmp4 .= λ - out .= 0 + Enzyme.make_zero!(out) Enzyme.make_zero!(tmp6) Enzyme.autodiff( Enzyme.Reverse, Enzyme.Duplicated(pf, tmp6), Enzyme.Const, diff --git a/src/quadrature_adjoint.jl b/src/quadrature_adjoint.jl index 648560de4..4ec165f1f 100644 --- a/src/quadrature_adjoint.jl +++ b/src/quadrature_adjoint.jl @@ -293,7 +293,7 @@ function vec_pjac!(out, λ, y, t, S::AdjointSensitivityIntegrand) elseif sensealg.autojacvec isa EnzymeVJP tmp3, tmp4, tmp6 = paramjac_config tmp4 .= λ - out .= 0 + Enzyme.make_zero!(out) Enzyme.make_zero!(tmp6) Enzyme.autodiff( Enzyme.Reverse, Enzyme.Duplicated(pf, tmp6), Enzyme.Const,