Skip to content

Commit

Permalink
a few more
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Jun 28, 2024
1 parent 0c56bec commit b97a7d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/derivative_wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(λ)
Expand Down
2 changes: 1 addition & 1 deletion src/gauss_adjoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/quadrature_adjoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b97a7d9

Please sign in to comment.