Skip to content

type unstable code in Gibbs fails with Enzyme #2706

@penelopeysm

Description

@penelopeysm
using Turing, ADTypes, Enzyme, Random, AbstractMCMC

adtype = AutoEnzyme(; mode=Enzyme.set_runtime_activity(Enzyme.Reverse), function_annotation=Enzyme.Const)
@model function f()
    a ~ Normal()
    b ~ Normal(a)
end

model = f()
spl = Gibbs(
    @varname(a) => HMC(0.1, 10; adtype=adtype),
    @varname(b) => HMC(0.1, 10; adtype=adtype),
)
AbstractMCMC.step(Xoshiro(468), model, spl)

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