Skip to content

Commit 52591a0

Browse files
authored
Remove uses of add and mul from tests because they have been removed ChainRulesCore (JuliaDiff#93)
* =Remove uses of add and mul from tests because they have been removed from ChainRulesCore * remove ref to Cassette. Slightly improve talk of ChainRulesCore * Update getting_started.md * Update Project.toml
1 parent 31b9bf4 commit 52591a0

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ChainRules"
22
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
3-
version = "0.1.0"
3+
version = "0.1.1"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
@@ -10,7 +10,7 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1010
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1111

1212
[compat]
13-
ChainRulesCore = "^0.1"
13+
ChainRulesCore = "^0.2"
1414
FiniteDifferences = "^0.7"
1515
julia = "^1.0"
1616

docs/src/getting_started.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Getting Started
22

3-
[ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl) is a light-weight dependency for defining sensitivities for functions in your packages, without you needing to depend on ChainRules itself.
4-
It only depends on [Cassette.jl](https://github.com/jrevels/Cassette.jl) which is also light-weight and has no dependencies.
3+
[ChainRulesCore.jl](https://github.com/JuliaDiff/ChainRulesCore.jl) is a light-weight dependency for defining sensitivities for functions in your packages, without you needing to depend on ChainRules itself. It has no dependencies of its own.
54

65
[ChainRules.jl](https://github.com/JuliaDiff/ChainRules.jl) provides the full functionality, including sensitivities for Base Julia and standard libraries.
76
Sensitivities for some other packages, currently SpecialFunctions.jl and NaNMath.jl, will also be loaded if those packages are in your environment.
8-
In general, we recommend adding custom sensitivities to your own packages with ChainRulesCore.
7+
In general, we recommend adding custom sensitivities to your own packages with ChainRulesCore, rather than adding them to ChainRules.jl.
98

109
## Defining Custom Sensitivities
1110

test/runtests.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ using Statistics
1010
using Test
1111

1212
# For testing purposes we use a lot of
13-
using ChainRulesCore: add, cast, extern, accumulate, accumulate!, store!, @scalar_rule,
14-
Wirtinger, wirtinger_primal, wirtinger_conjugate, add_wirtinger, mul_wirtinger,
15-
Zero, add_zero, mul_zero, One, add_one, mul_one, Casted, cast, add_casted, mul_casted,
16-
DNE, Thunk, Casted, DNERule
13+
using ChainRulesCore: cast, extern, accumulate, accumulate!, store!, @scalar_rule,
14+
Wirtinger, wirtinger_primal, wirtinger_conjugate,
15+
Zero, One, Casted, DNE, Thunk, DNERule
1716

1817
include("test_util.jl")
1918

test/test_util.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ function Base.isapprox(d_ad::AbstractDifferential, d_fd; kwargs...)
168168
end
169169

170170
function test_accumulation(x̄, dx, ȳ, partial)
171-
@test all(extern(add(x̄, partial)) .≈ extern(x̄) .+ extern(partial))
171+
@test all(extern(+ partial) .≈ extern(x̄) .+ extern(partial))
172172
test_accumulate(x̄, dx, ȳ, partial)
173173
test_accumulate!(x̄, dx, ȳ, partial)
174174
test_store!(x̄, dx, ȳ, partial)

0 commit comments

Comments
 (0)