Skip to content

Commit 142dddf

Browse files
wsmosespenelopeysm
andauthored
Refactor inactive_noinl to inactive for istrans (#1043)
* Refactor inactive_noinl to inactive for istrans May be an alternate resolution to EnzymeAD/Enzyme.jl#2589 probably merits runnign enzyme tests here to confirm it works? * [no ci] bump patch and changelog * fix stale dep --------- Co-authored-by: Penelope Yong <[email protected]>
1 parent 7249158 commit 142dddf

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# DynamicPPL Changelog
22

3+
## 0.37.3
4+
5+
Prevents inlining of `DynamicPPL.istrans` with Enzyme, which allows Enzyme to differentiate models where `VarName`s have the same symbol but different types.
6+
37
## 0.37.2
48

59
Make the `resume_from` keyword work for multiple-chain (parallel) sampling as well.

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "DynamicPPL"
22
uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
3-
version = "0.37.2"
3+
version = "0.37.3"
44

55
[deps]
66
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -23,7 +23,6 @@ MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
2323
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
2424
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
2525
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
26-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
2726
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2827
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2928

@@ -71,7 +70,6 @@ Mooncake = "0.4.147"
7170
OrderedCollections = "1"
7271
Printf = "1.10"
7372
Random = "1.6"
74-
Requires = "1"
7573
Statistics = "1"
7674
Test = "1.6"
7775
julia = "1.10.8"

ext/DynamicPPLEnzymeCoreExt.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ end
1212

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

1817
end

src/DynamicPPL.jl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,6 @@ include("test_utils.jl")
199199
include("experimental.jl")
200200
include("deprecated.jl")
201201

202-
if !isdefined(Base, :get_extension)
203-
using Requires
204-
end
205-
206202
# Better error message if users forget to load JET
207203
if isdefined(Base.Experimental, :register_error_hint)
208204
function __init__()

0 commit comments

Comments
 (0)