Skip to content

Commit fd3df79

Browse files
fix weak deps
1 parent 1352888 commit fd3df79

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,13 @@ MonteCarloMeasurements = "0987c9cc-fe09-11e8-30f0-b96dd679fdca"
8989
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
9090
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
9191
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
92+
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
9293
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
9394
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
9495
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
96+
Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c"
9597
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
98+
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
9699

97100
[targets]
98101
test = ["Distributed", "GeneralizedGenerated", "Measurements", "MonteCarloMeasurements", "Unitful", "LabelledArrays", "ForwardDiff", "InteractiveUtils", "Plots", "Pkg", "Random", "SafeTestsets", "Statistics", "Test", "Distributions"]

ext/DiffEqBaseReverseDiffExt.jl

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

3+
using DiffEqBase
4+
import DiffEqBase: value
5+
import ReverseDiff
6+
37
DiffEqBase.value(x::ReverseDiff.TrackedReal) = x.value
48
DiffEqBase.value(x::ReverseDiff.TrackedArray) = x.value
59

ext/DiffEqBaseTrackerExt.jl

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
module DiffEqBaseTrackerExt
22

3-
function RecursiveArrayTools.recursivecopy!(b::AbstractArray{T, N},
4-
a::AbstractArray{T2, N}) where {
5-
T <:
6-
Tracker.TrackedArray,
7-
T2 <:
8-
Tracker.TrackedArray,
9-
N}
10-
@inbounds for i in eachindex(a)
11-
b[i] = copy(a[i])
12-
end
13-
end
3+
using DiffEqBase
4+
import DiffEqBase: value
5+
import Tracker
146

157
DiffEqBase.value(x::Type{Tracker.TrackedReal{T}}) where {T} = T
168
DiffEqBase.value(x::Type{Tracker.TrackedArray{T, N, A}}) where {T, N, A} = Array{T, N}

ext/DiffEqBaseZygoteExt.jl

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

3+
using DiffEqBase
4+
import DiffEqBase: value
5+
import Zygote
6+
37
function ∇tmap(cx, f, args...)
48
ys_and_backs = SciMLBase.tmap((args...) -> Zygote._pullback(cx, f, args...), args...)
59
if isempty(ys_and_backs)

0 commit comments

Comments
 (0)