Skip to content

Commit 570b493

Browse files
committed
Skip segfaulting model
1 parent cdbde76 commit 570b493

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/ad.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using DynamicPPL: LogDensityFunction
22
using Enzyme: Enzyme
3-
using EnzymeCore: set_runtime_activity, Forward, Reverse
3+
using EnzymeCore: set_runtime_activity, Forward, Reverse, ReverseMode
44

55
@testset verbose = true "Automatic differentiation" begin
66
@testset "Unsupported backends" begin
@@ -35,10 +35,13 @@ using EnzymeCore: set_runtime_activity, Forward, Reverse
3535

3636
# Put predicates here to avoid long lines
3737
is_mooncake = adtype isa AutoMooncake
38+
is_enzyme_reverse = adtype isa AutoEnzyme && adtype.mode isa ReverseMode
3839
is_1_10 = v"1.10" <= VERSION < v"1.11"
3940
is_1_11 = v"1.11" <= VERSION < v"1.12"
4041
is_svi_vnv = varinfo isa SimpleVarInfo{<:DynamicPPL.VarNamedVector}
4142
is_svi_od = varinfo isa SimpleVarInfo{<:OrderedDict}
43+
is_svi_od_ref = varinfo isa SimpleVarInfo{<:OrderedDict,<:Ref}
44+
is_svi_od_not_ref = is_svi_od && !is_svi_od_ref
4245

4346
# Mooncake doesn't work with several combinations of SimpleVarInfo.
4447
if is_mooncake && is_1_11 && is_svi_vnv
@@ -52,6 +55,12 @@ using EnzymeCore: set_runtime_activity, Forward, Reverse
5255
@test_throws Mooncake.MooncakeRuleCompilationError DynamicPPL.setadtype(
5356
ref_ldf, adtype
5457
)
58+
elseif string(m.f) == "demo_dot_assume_dot_observe" &&
59+
is_enzyme_reverse &&
60+
is_svi_od_not_ref &&
61+
is_1_11
62+
# TODO: report upstream, this segfaults
63+
@test_broken false
5564
else
5665
ldf = DynamicPPL.setadtype(ref_ldf, adtype)
5766
logp, grad = LogDensityProblems.logdensity_and_gradient(ldf, x)

0 commit comments

Comments
 (0)