Skip to content

Commit

Permalink
fix Enzyme call
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Portal committed Aug 9, 2024
1 parent c2a014b commit 4207a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/AdvancedVIEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function AdvancedVI.value_and_gradient!(
∇θ = DiffResults.gradient(out)
fill!(∇θ, zero(T))
_, y = Enzyme.autodiff(
Enzyme.ReverseWithPrimal, f, Enzyme.Active, Enzyme.Duplicated(θ, ∇θ)
Enzyme.ReverseWithPrimal, Enzyme.Const(f), Enzyme.Active, Enzyme.Duplicated(θ, ∇θ)
)
DiffResults.value!(out, y)
return out
Expand Down

0 comments on commit 4207a87

Please sign in to comment.