diff --git a/ext/DynamicPPLEnzymeCoreExt.jl b/ext/DynamicPPLEnzymeCoreExt.jl index f83d6e8f7..ceb3f4981 100644 --- a/ext/DynamicPPLEnzymeCoreExt.jl +++ b/ext/DynamicPPLEnzymeCoreExt.jl @@ -10,4 +10,9 @@ end @inline EnzymeCore.EnzymeRules.inactive_type(::Type{<:DynamicPPL.SamplingContext}) = true +# Mark istrans as having 0 derivative. The `nothing` return value is not significant, Enzyme +# only checks whether such a method exists, and never runs it. +@inline EnzymeCore.EnzymeRules.inactive_noinl(::typeof(DynamicPPL.istrans), args...) = + nothing + end