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 13, 2024
1 parent 1408f61 commit 0b63bbd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/derivative_wrappers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -668,14 +668,14 @@ 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
# tmp2 = dgrad
#else
dup = if !(tmp2 isa DiffEqBase.NullParameters)
tmp2 .= 0
Enzyme.make_zero!(tmp2)
Enzyme.Duplicated(p, tmp2)
else
Enzyme.Const(p)
Expand All @@ -685,7 +685,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 @@ -476,7 +476,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 @@ -290,7 +290,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 0b63bbd

Please sign in to comment.