Skip to content

Commit f941e17

Browse files
committed
no longer need Task for Enzyme
1 parent 4703635 commit f941e17

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

ext/ComradeEnzymeExt.jl

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ LogDensityProblems.capabilities(::Type{<:Comrade.TransformedVLBIPosterior}) = Lo
1111
function LogDensityProblems.logdensity_and_gradient(d::Comrade.TransformedVLBIPosterior, x::AbstractArray)
1212
mode = Enzyme.EnzymeCore.WithPrimal(Comrade.admode(d))
1313
dx = zero(x)
14-
y = fetch(schedule(
15-
Task(32*1024*1024) do
16-
(_, y) = autodiff(mode, Comrade.logdensityof, Active, Const(d), Duplicated(x, dx))
17-
return y
18-
end
19-
))
14+
(_, y) = autodiff(mode, Comrade.logdensityof, Active, Const(d), Duplicated(x, dx))
2015
return y, dx
2116
end
2217

0 commit comments

Comments
 (0)