-
Notifications
You must be signed in to change notification settings - Fork 228
Closed
Description
The testsets that involve actual AD evaluation (i.e. DynamicPPL.TestUtils.AD.run_ad
) have quite similar runtimes, but the moment we call sample
, all hell breaks loose (and we are barely even sampling!):
@testset verbose = true "AD / Gibbs sampling" begin
# Make sure that Gibbs sampling doesn't fall over when using AD.
@testset "adtype=$adtype" for adtype in ADTYPES
spl = Gibbs(
@varname(s) => HMC(0.1, 10; adtype=adtype),
@varname(m) => HMC(0.1, 10; adtype=adtype),
)
@testset "model=$(model.f)" for model in DEMO_MODELS
@test sample(model, spl, 2) isa Any
end
end
end
AD / Gibbs sampling | 39 39 93m39.7s
adtype=ADTypes.AutoForwardDiff() | 13 13 13m57.6s
adtype=ADTypes.AutoReverseDiff() | 13 13 36m59.2s
adtype=ADTypes.AutoMooncake{Nothing}(nothing) | 13 13 42m42.9s
AD / Gibbs sampling | 39 39 12m58.3s
adtype=ADTypes.AutoForwardDiff() | 13 13 2m33.9s
adtype=ADTypes.AutoReverseDiff() | 13 13 2m13.8s
adtype=ADTypes.AutoMooncake{Nothing}(nothing) | 13 13 8m10.6s
It's only two iterations --- is it compilation time that's the problem??
Metadata
Metadata
Assignees
Labels
No labels