Skip to content

Commit

Permalink
Mark istrans as inactive (#658)
Browse files Browse the repository at this point in the history
* Mark istrans as inactive

* Update DynamicPPLEnzymeCoreExt.jl

* Update DynamicPPLEnzymeCoreExt.jl

* Expand Enzyme extension comment

---------

Co-authored-by: Markus Hauru <mhauru@turing.ac.uk>
  • Loading branch information
wsmoses and mhauru committed Sep 12, 2024
1 parent bf73fd0 commit ad88334
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/DynamicPPLEnzymeCoreExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ad88334

Please sign in to comment.