Skip to content

Commit

Permalink
Load ForwardDiff correctly (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Apr 27, 2021
1 parent bfc78b2 commit e0d8dfd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "DistributionsAD"
uuid = "ced4e74d-a319-5a8a-b0ac-84af2272839c"
version = "0.6.24"
version = "0.6.25"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down
7 changes: 6 additions & 1 deletion src/DistributionsAD.jl
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,17 @@ include("zygote.jl")

@init begin
@require ForwardDiff="f6369f11-7733-5829-9624-2563aa707210" begin
using .ForwardDiff
using .ForwardDiff: @define_binary_dual_op # Needed for `eval`ing diffrules here
include("forwarddiff.jl")
end

@require ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" begin
include("reversediff.jl")
# ensures that we can load ForwardDiff without depending on it
# (it is a dependency of ReverseDiff and therefore always available)
@require ForwardDiff="f6369f11-7733-5829-9624-2563aa707210" begin
include("reversediff.jl")
end
end

@require Tracker="9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" begin
Expand Down
4 changes: 2 additions & 2 deletions src/reversediff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ using ..ReverseDiff
using StaticArrays
using Distributions
using PDMats
using ForwardDiff
using ..ForwardDiff

using Base.Broadcast: BroadcastStyle, ArrayStyle, Broadcasted, broadcasted
using ForwardDiff: Dual
using ..ForwardDiff: Dual
using ..ReverseDiff: SpecialInstruction, value, value!, deriv, track, record!,
tape, unseed!, @grad, TrackedReal, TrackedVector,
TrackedMatrix, TrackedArray
Expand Down

2 comments on commit e0d8dfd

@devmotion
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/35454

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.6.25 -m "<description of version>" e0d8dfda6c12327e1935bf08c00811dcc3180baf
git push origin v0.6.25

Please sign in to comment.