Skip to content

Turing.jl model errors with "basic block does not dominate" #200

@mhauru

Description

@mhauru

Needs investigation, but here's the MWE:

julia> module MWE

       using Turing

       @model function linear_regression(x)
           β ~ Normal()

           # Likelihood
           μ = β .* x
           y ~ MvNormal(μ, I)
       end

       x = [0.0]
       y = [0.0]

       m = linear_regression(x) | (; y=y)

       sample(m, SMC(), 1000)

       end
WARNING: replacing module MWE.
Basic Block 136 does not dominate block 142 (tried to use value %310 at %326)
5  1 ─── %1   = (Libtask.resume_block_is)(_1, 143)::Any%2   = (Libtask.resume_block_is)(_1, 156)::Any%3   = (Libtask.resume_block_is)(_1, 169)::Any%4   = (Libtask.resume_block_is)(_1, 193)::Any%5   = (Libtask.resume_block_is)(_1, 209)::Any%6   = (Libtask.resume_block_is)(_1, 222)::Any%7   = (Libtask.resume_block_is)(_1, 237)::Any%8   = (Libtask.resume_block_is)(_1, 258)::Any%9   = (Libtask.resume_block_is)(_1, 271)::Any%10  = (Libtask.resume_block_is)(_1, 289)::Any%11  = (Libtask.resume_block_is)(_1, 305)::Any%12  = (Libtask.resume_block_is)(_1, 322)::Any%13  = (Libtask.resume_block_is)(_1, 338)::Any%14  = (Libtask.resume_block_is)(_1, 351)::Any%15  = (Libtask.resume_block_is)(_1, 367)::Any%16  = (Libtask.resume_block_is)(_1, 386)::Any%17  = (Libtask.resume_block_is)(_1, 399)::Any
   └────        nothing::Any
   2 ───        goto #29 if not %1
   3 ───        goto #35 if not %2
   4 ───        goto #41 if not %3
   5 ───        goto #51 if not %4
   6 ───        goto #58 if not %5
   7 ───        goto #64 if not %6
   8 ───        goto #72 if not %7
   9 ───        goto #86 if not %8
   10 ──        goto #92 if not %9
   11 ──        goto #98 if not %10
   12 ──        goto #104 if not %11
   13 ──        goto #110 if not %12
   14 ──        goto #117 if not %13
   15 ──        goto #123 if not %14
   16 ──        goto #130 if not %15
   17 ──        goto #137 if not %16
   18 ──        goto #143 if not %17
   19 ──        goto #20
   20 ──        nothing::Nothing
   └────        goto #21
   21 ──        nothing::Nothing
   └────        goto #22
   22 ──        nothing::Nothing
   └────        goto #23
   23 ──        nothing::Nothing
   └────        goto #24
   24 ──        nothing::Nothing
   └────        goto #25
   25 ──        nothing::Nothing
   └────        goto #26
   26 ──        nothing::Nothing
   └────        goto #27
6  27 ── %51  = Base.getfield(_3, :context)::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, DynamicPPL.ConditionContext{@NamedTuple{y::Vector{Float64}}, DynamicPPL.DefaultContext}, AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}}
5  │            (Libtask.set_ref_at!)(_1, 1, %51)::Any%53  = (Libtask.get_ref_at)(_1, 1)::Any
6%54  = Base.getfield(%53, :rng)::AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}
5  │            (Libtask.set_ref_at!)(_1, 2, %54)::Any%56  = (Libtask.get_ref_at)(_1, 1)::Any
6%57  = Base.getfield(%56, :sampler)::DynamicPPL.Sampler{Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}
5  │            (Libtask.set_ref_at!)(_1, 3, %57)::Any%59  = (Libtask.get_ref_at)(_1, 2)::Any%60  = (Libtask.get_ref_at)(_1, 3)::Any
6%61  = invoke DynamicPPL.assume(%59::AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}, %60::DynamicPPL.Sampler{Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, $(QuoteNode(Distributions.Normal{Float64}=0.0, σ=1.0)))::Distributions.Normal{Float64}, $(QuoteNode(β))::AbstractPPL.VarName{:β, typeof(identity)}, _4::DynamicPPL.VarInfo{@NamedTuple::DynamicPPL.Metadata{Dict{AbstractPPL.VarName{:β, typeof(identity)}, Int64}, Vector{Distributions.Normal{Float64}}, Vector{AbstractPPL.VarName{:β, typeof(identity)}}, Vector{Float64}}}, DynamicPPL.AccumulatorTuple{3, @NamedTuple{LogPrior::DynamicPPL.LogPriorAccumulator{Float64}, LogJacobian::DynamicPPL.LogJacobianAccumulator{Float64}, LogLikelihood::Turing.Inference.ProduceLogLikelihoodAccumulator{Float64}}}})::Tuple{Any, Any}
5  │            (Libtask.set_ref_at!)(_1, 4, %61)::Any%63  = (Libtask.get_ref_at)(_1, 4)::Any
6%64  = Base.getfield(%63, 1)::Any
5  │            (Libtask.set_ref_at!)(_1, 5, %64)::Any%66  = (Libtask.get_ref_at)(_1, 4)::Any
6%67  = Base.getfield(%66, 2)::Any
5  │            (Libtask.set_ref_at!)(_1, 6, %67)::Any
   └────        goto #28
   28 ──        goto #29
   29 ┄─ %71  = (Libtask.get_ref_at)(_1, 5)::Any%72  = (Libtask.get_ref_at)(_1, 45)::Any%73  = (%72)(Base.broadcasted, Main.MWE.:*, %71, _5)::Any
   └──── %74  = (Libtask.not_a_produced)(%73)::Any
   30 ──        goto #32 if not %74
   31 ──        goto #33
   32 ──        (Libtask.set_resume_block!)(_1, 143)::Any
   └────        return %73
   33 ──        (Libtask.set_ref_at!)(_1, 7, %73)::Any
   └────        goto #34
   34 ──        goto #35
   35 ┄─ %82  = (Libtask.get_ref_at)(_1, 7)::Any%83  = (Libtask.get_ref_at)(_1, 46)::Any%84  = (%83)(Base.materialize, %82)::Any
   └──── %85  = (Libtask.not_a_produced)(%84)::Any
   36 ──        goto #38 if not %85
   37 ──        goto #39
   38 ──        (Libtask.set_resume_block!)(_1, 156)::Any
   └────        return %84
   39 ──        (Libtask.set_ref_at!)(_1, 8, %84)::Any
   └────        goto #40
   40 ──        goto #41
   41 ┄─ %93  = (Libtask.get_ref_at)(_1, 8)::Any%94  = (Libtask.get_ref_at)(_1, 47)::Any%95  = (%94)(Main.MWE.MvNormal, %93, Main.MWE.I)::Any
   └──── %96  = (Libtask.not_a_produced)(%95)::Any
   42 ──        goto #44 if not %96
   43 ──        goto #45
   44 ──        (Libtask.set_resume_block!)(_1, 169)::Any
   └────        return %95
   45 ──        (Libtask.set_ref_at!)(_1, 9, %95)::Any
   └────        goto #46
   46 ── %103 = (Libtask.get_ref_at)(_1, 9)::Any
10%104 = (isa)(%103, DynamicPPL.NamedDist)::Bool
5  │            (Libtask.set_ref_at!)(_1, 10, %104)::Any%106 = (Libtask.get_ref_at)(_1, 10)::Any
   └────        goto #48 if not %106
   47 ── %108 = (Libtask.get_ref_at)(_1, 9)::Any%109 = π (%108, DynamicPPL.NamedDist)
   │            (Libtask.set_ref_at!)(_1, 11, %109)::Any%111 = (Libtask.get_ref_at)(_1, 11)::Any
10%112 = Base.getfield(%111, :name)::AbstractPPL.VarName
5  │            (Libtask.set_ref_at!)(_1, 12, %112)::Any
   └────        goto #50
   48 ──        nothing::Nothing
   └────        goto #49
   49 ──        goto #50
   50 ┄─ %118 = φ (#47 => Libtask.TupleRef(12), #49 => $(QuoteNode(y)))::Any%119 = (Libtask.deref_phi)(_1, %118)::Any
   │            (Libtask.set_ref_at!)(_1, 13, %119)::Any
10%121 = Base.getfield(_3, :context)::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, DynamicPPL.ConditionContext{@NamedTuple{y::Vector{Float64}}, DynamicPPL.DefaultContext}, AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}}
5  │            (Libtask.set_ref_at!)(_1, 14, %121)::Any
   └────        goto #51
   51 ┄─ %124 = (Libtask.get_ref_at)(_1, 14)::Any%125 = (Libtask.get_ref_at)(_1, 13)::Any%126 = (Libtask.get_ref_at)(_1, 48)::Any%127 = (%126)(DynamicPPL.contextual_isassumption, %124, %125)::Any
   └──── %128 = (Libtask.not_a_produced)(%127)::Any
   52 ──        goto #54 if not %128
   53 ──        goto #55
   54 ──        (Libtask.set_resume_block!)(_1, 193)::Any
   └────        return %127
   55 ──        (Libtask.set_ref_at!)(_1, 15, %127)::Any
   └────        goto #56
   56 ── %135 = (Libtask.get_ref_at)(_1, 15)::Any
   └────        goto #82 if not %135
   57 ──        goto #58
   58 ┄─ %138 = (Libtask.get_ref_at)(_1, 13)::Any%139 = (Libtask.get_ref_at)(_1, 49)::Any%140 = (%139)(DynamicPPL.inargnames, %138, _3)::Any
   └──── %141 = (Libtask.not_a_produced)(%140)::Any
   59 ──        goto #61 if not %141
   60 ──        goto #62
   61 ──        (Libtask.set_resume_block!)(_1, 209)::Any
   └────        return %140
   62 ──        (Libtask.set_ref_at!)(_1, 16, %140)::Any
   └────        goto #63
   63 ──        goto #64
   64 ┄─ %149 = (Libtask.get_ref_at)(_1, 16)::Any%150 = (Libtask.get_ref_at)(_1, 50)::Any%151 = (%150)(Main.MWE.:!, %149)::Any
   └──── %152 = (Libtask.not_a_produced)(%151)::Any
   65 ──        goto #67 if not %152
   66 ──        goto #68
   67 ──        (Libtask.set_resume_block!)(_1, 222)::Any
   └────        return %151
   68 ──        (Libtask.set_ref_at!)(_1, 17, %151)::Any
   └────        goto #69
   69 ── %159 = (Libtask.get_ref_at)(_1, 17)::Any
   └────        goto #71 if not %159
   70 ──        goto #80
   71 ──        goto #72
   72 ┄─ %163 = (Libtask.get_ref_at)(_1, 13)::Any%164 = (Libtask.get_ref_at)(_1, 51)::Any%165 = (%164)(DynamicPPL.inmissings, %163, _3)::Any
   └──── %166 = (Libtask.not_a_produced)(%165)::Any
   73 ──        goto #75 if not %166
   74 ──        goto #76
   75 ──        (Libtask.set_resume_block!)(_1, 237)::Any
   └────        return %165
   76 ──        (Libtask.set_ref_at!)(_1, 18, %165)::Any
   └────        goto #77
   77 ── %173 = (Libtask.get_ref_at)(_1, 18)::Any
   └────        goto #79 if not %173
   78 ──        goto #80
10 79 ──        $(Expr(:throw_undef_if_not, :y, false))::Any
5  │            (Libtask.set_resume_block!)(_1, -1)::Any
10 └────        unreachable
   80 ┄─        nothing::Nothing
5  └────        goto #81
   81 ──        goto #83
   82 ──        nothing::Nothing
   └────        goto #83
   83 ┄─ %184 = φ (#81 => true, #82 => false)::Any%185 = (Libtask.deref_phi)(_1, %184)::Any
   │            (Libtask.set_ref_at!)(_1, 19, %185)::Any
   └────        goto #84
   84 ── %188 = (Libtask.get_ref_at)(_1, 19)::Any
   └────        goto #116 if not %188
10 85 ── %190 = Base.getfield(_3, :context)::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, DynamicPPL.ConditionContext{@NamedTuple{y::Vector{Float64}}, DynamicPPL.DefaultContext}, AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}}
5  │            (Libtask.set_ref_at!)(_1, 20, %190)::Any
   └────        goto #86
   86 ┄─ %193 = (Libtask.get_ref_at)(_1, 9)::Any%194 = (Libtask.get_ref_at)(_1, 52)::Any%195 = (%194)(DynamicPPL.check_tilde_rhs, %193)::Any
   └──── %196 = (Libtask.not_a_produced)(%195)::Any
   87 ──        goto #89 if not %196
   88 ──        goto #90
   89 ──        (Libtask.set_resume_block!)(_1, 258)::Any
   └────        return %195
   90 ──        (Libtask.set_ref_at!)(_1, 21, %195)::Any
   └────        goto #91
   91 ──        goto #92
   92 ┄─ %204 = (Libtask.get_ref_at)(_1, 21)::Any%205 = (Libtask.get_ref_at)(_1, 13)::Any%206 = (Libtask.get_ref_at)(_1, 53)::Any%207 = (%206)(DynamicPPL.unwrap_right_vn, %204, %205)::Any
   └──── %208 = (Libtask.not_a_produced)(%207)::Any
   93 ──        goto #95 if not %208
   94 ──        goto #96
   95 ──        (Libtask.set_resume_block!)(_1, 271)::Any
   └────        return %207
   96 ──        (Libtask.set_ref_at!)(_1, 22, %207)::Any
   └────        goto #97
   97 ── %215 = (Libtask.get_ref_at)(_1, 22)::Any
10%216 = Core.getfield(%215, 1)::Any
5  │            (Libtask.set_ref_at!)(_1, 23, %216)::Any%218 = (Libtask.get_ref_at)(_1, 22)::Any
10%219 = Core.getfield(%218, 2)::AbstractPPL.VarName
5  │            (Libtask.set_ref_at!)(_1, 24, %219)::Any
   └────        goto #98
   98 ┄─ %222 = (Libtask.get_ref_at)(_1, 20)::Any%223 = (Libtask.get_ref_at)(_1, 23)::Any%224 = (Libtask.get_ref_at)(_1, 24)::Any%225 = (Libtask.get_ref_at)(_1, 6)::Any%226 = (Libtask.get_ref_at)(_1, 54)::Any%227 = (%226)(DynamicPPL.tilde_assume!!, %222, %223, %224, %225)::Any
   └──── %228 = (Libtask.not_a_produced)(%227)::Any
   99 ──        goto #101 if not %228
   100 ─        goto #102
   101 ─        (Libtask.set_resume_block!)(_1, 289)::Any
   └────        return %227
   102 ─        (Libtask.set_ref_at!)(_1, 25, %227)::Any
   └────        goto #103
   103 ─        goto #104
   104%236 = (Libtask.get_ref_at)(_1, 25)::Any%237 = (Libtask.get_ref_at)(_1, 55)::Any%238 = (%237)(Base.indexed_iterate, %236, 1)::Any
   └──── %239 = (Libtask.not_a_produced)(%238)::Any
   105 ─        goto #107 if not %239
   106 ─        goto #108
   107 ─        (Libtask.set_resume_block!)(_1, 305)::Any
   └────        return %238
   108 ─        (Libtask.set_ref_at!)(_1, 26, %238)::Any
   └────        goto #109
   109%246 = (Libtask.get_ref_at)(_1, 26)::Any
10%247 = Core.getfield(%246, 1)::Any
5  │            (Libtask.set_ref_at!)(_1, 27, %247)::Any%249 = (Libtask.get_ref_at)(_1, 26)::Any
10%250 = Core.getfield(%249, 2)::Any
5  │            (Libtask.set_ref_at!)(_1, 28, %250)::Any
   └────        goto #110
   110%253 = (Libtask.get_ref_at)(_1, 25)::Any%254 = (Libtask.get_ref_at)(_1, 28)::Any%255 = (Libtask.get_ref_at)(_1, 56)::Any%256 = (%255)(Base.indexed_iterate, %253, 2, %254)::Any
   └──── %257 = (Libtask.not_a_produced)(%256)::Any
   111 ─        goto #113 if not %257
   112 ─        goto #114
   113 ─        (Libtask.set_resume_block!)(_1, 322)::Any
   └────        return %256
   114 ─        (Libtask.set_ref_at!)(_1, 29, %256)::Any
   └────        goto #115
   115%264 = (Libtask.get_ref_at)(_1, 29)::Any
10%265 = Core.getfield(%264, 1)::Any
5  │            (Libtask.set_ref_at!)(_1, 30, %265)::Any
   └────        goto #149
   116 ─        goto #117
   117%269 = (Libtask.get_ref_at)(_1, 13)::Any%270 = (Libtask.get_ref_at)(_1, 57)::Any%271 = (%270)(DynamicPPL.inargnames, %269, _3)::Any
   └──── %272 = (Libtask.not_a_produced)(%271)::Any
   118 ─        goto #120 if not %272
   119 ─        goto #121
   120 ─        (Libtask.set_resume_block!)(_1, 338)::Any
   └────        return %271
   121 ─        (Libtask.set_ref_at!)(_1, 31, %271)::Any
   └────        goto #122
   122 ─        goto #123
   123%280 = (Libtask.get_ref_at)(_1, 31)::Any%281 = (Libtask.get_ref_at)(_1, 58)::Any%282 = (%281)(Main.MWE.:!, %280)::Any
   └──── %283 = (Libtask.not_a_produced)(%282)::Any
   124 ─        goto #126 if not %283
   125 ─        goto #127
   126 ─        (Libtask.set_resume_block!)(_1, 351)::Any
   └────        return %282
   127 ─        (Libtask.set_ref_at!)(_1, 32, %282)::Any
   └────        goto #128
   128%290 = (Libtask.get_ref_at)(_1, 32)::Any
   └────        goto #136 if not %290
10 129%292 = Base.getfield(_3, :context)::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, DynamicPPL.ConditionContext{@NamedTuple{y::Vector{Float64}}, DynamicPPL.DefaultContext}, AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}}
5  │            (Libtask.set_ref_at!)(_1, 33, %292)::Any
   └────        goto #130
   130%295 = (Libtask.get_ref_at)(_1, 33)::Any%296 = (Libtask.get_ref_at)(_1, 13)::Any%297 = (Libtask.get_ref_at)(_1, 59)::Any%298 = (%297)(DynamicPPL.getconditioned_nested, %295, %296)::Any
   └──── %299 = (Libtask.not_a_produced)(%298)::Any
   131 ─        goto #133 if not %299
   132 ─        goto #134
   133 ─        (Libtask.set_resume_block!)(_1, 367)::Any
   └────        return %298
   134 ─        (Libtask.set_ref_at!)(_1, 34, %298)::Any
   └────        goto #135
   135 ─        goto #136
   136%307 = φ (#135 => Libtask.TupleRef(34), #128 => #undef)::Any%308 = φ (#135 => true, #128 => false)::Any%309 = (Libtask.deref_phi)(_1, %307)::Any%310 = (Libtask.deref_phi)(_1, %308)::Any
   │            (Libtask.set_ref_at!)(_1, 35, %309)::Any
   │            (Libtask.set_ref_at!)(_1, 36, %310)::Any
10%313 = Base.getfield(_3, :context)::DynamicPPL.SamplingContext{DynamicPPL.Sampler{Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{typeof(AdvancedPS.resample_systematic), Float64}}}, DynamicPPL.ConditionContext{@NamedTuple{y::Vector{Float64}}, DynamicPPL.DefaultContext}, AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}}
5  │            (Libtask.set_ref_at!)(_1, 37, %313)::Any
   └────        goto #137
   137%316 = (Libtask.get_ref_at)(_1, 9)::Any%317 = (Libtask.get_ref_at)(_1, 60)::Any%318 = (%317)(DynamicPPL.check_tilde_rhs, %316)::Any
   └──── %319 = (Libtask.not_a_produced)(%318)::Any
   138 ─        goto #140 if not %319
   139 ─        goto #141
   140 ─        (Libtask.set_resume_block!)(_1, 386)::Any
   └────        return %318
   141 ─        (Libtask.set_ref_at!)(_1, 38, %318)::Any
   └────        goto #142
10 142$(Expr(:throw_undef_if_not, :y, :(%310)))::Any
5  └────        goto #143
   143%328 = (Libtask.get_ref_at)(_1, 37)::Any%329 = (Libtask.get_ref_at)(_1, 38)::Any%330 = (Libtask.get_ref_at)(_1, 35)::Any%331 = (Libtask.get_ref_at)(_1, 13)::Any%332 = (Libtask.get_ref_at)(_1, 6)::Any%333 = (Libtask.get_ref_at)(_1, 61)::Any%334 = (%333)(DynamicPPL.tilde_observe!!, %328, %329, %330, %331, %332)::Any
   └──── %335 = (Libtask.not_a_produced)(%334)::Any
   144 ─        goto #146 if not %335
   145 ─        goto #147
   146 ─        (Libtask.set_resume_block!)(_1, 399)::Any
   └────        return %334
   147 ─        (Libtask.set_ref_at!)(_1, 39, %334)::Any
   └────        goto #148
   148%342 = (Libtask.get_ref_at)(_1, 39)::Any
10%343 = Base.getfield(%342, 1)::Any
5  │            (Libtask.set_ref_at!)(_1, 40, %343)::Any%345 = (Libtask.get_ref_at)(_1, 39)::Any
10%346 = Base.getfield(%345, 2)::Any
5  │            (Libtask.set_ref_at!)(_1, 41, %346)::Any
   └────        goto #149
   149%349 = φ (#115 => Libtask.TupleRef(30), #148 => Libtask.TupleRef(41))::Any%350 = φ (#115 => Libtask.TupleRef(27), #148 => Libtask.TupleRef(40))::Any%351 = (Libtask.deref_phi)(_1, %349)::Any%352 = (Libtask.deref_phi)(_1, %350)::Any
   │            (Libtask.set_ref_at!)(_1, 42, %351)::Any
   │            (Libtask.set_ref_at!)(_1, 43, %352)::Any
   └────        goto #150
   150%356 = (Libtask.get_ref_at)(_1, 43)::Any%357 = (Libtask.get_ref_at)(_1, 42)::Any
10%358 = Core.tuple(%356, %357)::Tuple{Any, Any}
5  │            (Libtask.set_ref_at!)(_1, 44, %358)::Any
   │            (Libtask.set_resume_block!)(_1, -1)::Any%361 = (Libtask.get_ref_at)(_1, 44)::Any
   └────        return %361
Sampling 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| Time: 0:00:00
ERROR:
Stacktrace:
  [1] error(s::String)
    @ Core.Compiler ./error.jl:35
  [2] check_op(ir::Core.Compiler.IRCode, domtree::Core.Compiler.GenericDomTree{false}, op::Any, use_bb::Int64, use_idx::Int64, printed_use_idx::Int64, print::Bool, isforeigncall::Bool, arg_idx::Int64, allow_frontend_forms::Bool)
    @ Core.Compiler ./compiler/ssair/verify.jl:46
  [3] verify_ir(ir::Core.Compiler.IRCode, print::Bool, allow_frontend_forms::Bool, 𝕃ₒ::Core.Compiler.PartialsLattice{Core.Compiler.ConstsLattice})
    @ Core.Compiler ./compiler/ssair/verify.jl:393
  [4] verify_ir
    @ ./compiler/ssair/verify.jl:98 [inlined]
  [5] optimise_ir!(ir::Core.Compiler.IRCode; show_ir::Bool, do_inline::Bool)
    @ Libtask ~/.julia/packages/Libtask/W3QP1/src/utils.jl:42
  [6] optimise_ir!
    @ ~/.julia/packages/Libtask/W3QP1/src/utils.jl:36 [inlined]
  [7] build_callable(sig::Type{Tuple{typeof(Main.MWE.linear_regression), DynamicPPL.Model{…}, DynamicPPL.VarInfo{…}, Vector{…}}})
    @ Libtask ~/.julia/packages/Libtask/W3QP1/src/copyable_task.jl:91
  [8] Libtask.TapedTask(::AdvancedPSLibtaskExt.TapedGlobals{AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}}, ::Function, ::Vararg{Any}; kwargs::@Kwargs{})
    @ Libtask ~/.julia/packages/Libtask/W3QP1/src/copyable_task.jl:282
  [9] Libtask.TapedTask(::AdvancedPSLibtaskExt.TapedGlobals{AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{UInt64, 10}}}, ::Function, ::Vararg{Any})
    @ Libtask ~/.julia/packages/Libtask/W3QP1/src/copyable_task.jl:279
 [10] #TapedTask#60
    @ ~/.julia/packages/Turing/gtb9I/src/mcmc/particle_mcmc.jl:95 [inlined]
 [11] TapedTask
    @ ~/.julia/packages/Turing/gtb9I/src/mcmc/particle_mcmc.jl:94 [inlined]
 [12] AdvancedPS.LibtaskModel(::Turing.Inference.TracedModel{DynamicPPL.Sampler{…}, DynamicPPL.VarInfo{…}, DynamicPPL.Model{…}, Tuple{…}}, ::AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{…}})
    @ AdvancedPSLibtaskExt ~/.julia/packages/AdvancedPS/mkUwY/ext/AdvancedPSLibtaskExt.jl:38
 [13] AdvancedPS.Trace(::Turing.Inference.TracedModel{DynamicPPL.Sampler{…}, DynamicPPL.VarInfo{…}, DynamicPPL.Model{…}, Tuple{…}}, ::AdvancedPS.TracedRNG{UInt64, 1, Random123.Philox2x{…}})
    @ AdvancedPSLibtaskExt ~/.julia/packages/AdvancedPS/mkUwY/ext/AdvancedPSLibtaskExt.jl:84
 [14] AdvancedPS.Trace(model::DynamicPPL.Model{…}, sampler::DynamicPPL.Sampler{…}, varinfo::DynamicPPL.VarInfo{…}, rng::AdvancedPS.TracedRNG{…})
    @ Turing.Inference ~/.julia/packages/Turing/gtb9I/src/mcmc/particle_mcmc.jl:510
 [15] (::Turing.Inference.var"#63#64"{DynamicPPL.Model{typeof(Main.MWE.linear_regression), (:x,), (), (), Tuple{}, Tuple{}, DynamicPPL.ConditionContext{}}, DynamicPPL.Sampler{Turing.Inference.SMC{}}})(::Int64)
    @ Turing.Inference ./none:0
 [16] iterate
    @ ./generator.jl:48 [inlined]
 [17] collect(itr::Base.Generator{UnitRange{Int64}, Turing.Inference.var"#63#64"{DynamicPPL.Model{typeof(Main.MWE.linear_regression), (:x,), (), (), Tuple{}, Tuple{}, DynamicPPL.ConditionContext{}}, DynamicPPL.Sampler{Turing.Inference.SMC{}}}})
    @ Base ./array.jl:791
 [18] initialstep(rng::Random.TaskLocalRNG, model::DynamicPPL.Model{…}, spl::DynamicPPL.Sampler{…}, vi::DynamicPPL.VarInfo{…}; nparticles::Int64, kwargs::@Kwargs{})
    @ Turing.Inference ~/.julia/packages/Turing/gtb9I/src/mcmc/particle_mcmc.jl:200
 [19] step(rng::Random.TaskLocalRNG, model::DynamicPPL.Model{…}, spl::DynamicPPL.Sampler{…}; initial_params::Nothing, kwargs::@Kwargs{})
    @ DynamicPPL ~/.julia/packages/DynamicPPL/R1CV0/src/sampler.jl:133
 [20] step
    @ ~/.julia/packages/DynamicPPL/R1CV0/src/sampler.jl:116 [inlined]
 [21] macro expansion
    @ ~/.julia/packages/AbstractMCMC/z4BsN/src/sample.jl:188 [inlined]
 [22] (::AbstractMCMC.var"#29#30"{Nothing, Int64, Int64, Int64, UnionAll, Nothing, @Kwargs{}, Random.TaskLocalRNG, DynamicPPL.Model{}, DynamicPPL.Sampler{}, Int64, Float64, Int64, Int64})()
    @ AbstractMCMC ~/.julia/packages/AbstractMCMC/z4BsN/src/logging.jl:134
 [23] with_logstate(f::AbstractMCMC.var"#29#30"{Nothing, Int64, Int64, Int64, UnionAll, Nothing, @Kwargs{}, Random.TaskLocalRNG, DynamicPPL.Model{}, DynamicPPL.Sampler{}, Int64, Float64, Int64, Int64}, logstate::Base.CoreLogging.LogState)
    @ Base.CoreLogging ./logging/logging.jl:524
 [24] with_logger(f::Function, logger::LoggingExtras.TeeLogger{Tuple{LoggingExtras.EarlyFilteredLogger{…}, LoggingExtras.EarlyFilteredLogger{…}}})
    @ Base.CoreLogging ./logging/logging.jl:635
 [25] with_progresslogger(f::Function, _module::Module, logger::Base.CoreLogging.ConsoleLogger)
    @ AbstractMCMC ~/.julia/packages/AbstractMCMC/z4BsN/src/logging.jl:157
 [26] macro expansion
    @ ~/.julia/packages/AbstractMCMC/z4BsN/src/logging.jl:133 [inlined]
 [27] mcmcsample(rng::Random.TaskLocalRNG, model::DynamicPPL.Model{…}, sampler::DynamicPPL.Sampler{…}, N::Int64; progress::Bool, progressname::String, callback::Nothing, num_warmup::Int64, discard_initial::Int64, thinning::Int64, chain_type::Type, initial_state::Nothing, kwargs::@Kwargs{})
    @ AbstractMCMC ~/.julia/packages/AbstractMCMC/z4BsN/src/sample.jl:168
 [28] sample(rng::Random.TaskLocalRNG, model::DynamicPPL.Model{…}, sampler::DynamicPPL.Sampler{…}, N::Int64; chain_type::Type, resume_from::Nothing, initial_state::Nothing, progress::Bool, kwargs::@Kwargs{})
    @ Turing.Inference ~/.julia/packages/Turing/gtb9I/src/mcmc/particle_mcmc.jl:161
 [29] sample
    @ ~/.julia/packages/Turing/gtb9I/src/mcmc/particle_mcmc.jl:149 [inlined]
 [30] #sample#105
    @ ~/.julia/packages/Turing/gtb9I/src/mcmc/abstractmcmc.jl:31 [inlined]
 [31] sample
    @ ~/.julia/packages/Turing/gtb9I/src/mcmc/abstractmcmc.jl:22 [inlined]
 [32] #sample#104
    @ ~/.julia/packages/Turing/gtb9I/src/mcmc/abstractmcmc.jl:19 [inlined]
 [33] sample(model::DynamicPPL.Model{typeof(Main.MWE.linear_regression), (:x,), (), (), Tuple{…}, Tuple{}, DynamicPPL.ConditionContext{…}}, alg::Turing.Inference.SMC{AdvancedPS.ResampleWithESSThreshold{…}}, N::Int64)
    @ Turing.Inference ~/.julia/packages/Turing/gtb9I/src/mcmc/abstractmcmc.jl:16
 [34] top-level scope
    @ REPL[15]:18
Some type information was truncated. Use `show(err)` to see complete types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions