Skip to content

Commit ad88334

Browse files
wsmosesmhauru
andauthored
Mark istrans as inactive (#658)
* Mark istrans as inactive * Update DynamicPPLEnzymeCoreExt.jl * Update DynamicPPLEnzymeCoreExt.jl * Expand Enzyme extension comment --------- Co-authored-by: Markus Hauru <mhauru@turing.ac.uk>
1 parent bf73fd0 commit ad88334

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ext/DynamicPPLEnzymeCoreExt.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ end
1010

1111
@inline EnzymeCore.EnzymeRules.inactive_type(::Type{<:DynamicPPL.SamplingContext}) = true
1212

13+
# Mark istrans as having 0 derivative. The `nothing` return value is not significant, Enzyme
14+
# only checks whether such a method exists, and never runs it.
15+
@inline EnzymeCore.EnzymeRules.inactive_noinl(::typeof(DynamicPPL.istrans), args...) =
16+
nothing
17+
1318
end

0 commit comments

Comments
 (0)