Skip to content

Commit 3a95baa

Browse files
authored
Merge pull request #1 from JuliaDiff/ox/abstractonly
Cut down to bare minimum for AbstractChainRules
2 parents 91c5d92 + 762a5e5 commit 3a95baa

36 files changed

+82
-1611
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ os:
55
julia:
66
- 1.0
77
- 1.1
8+
- 1.2
89
- nightly
910
matrix:
1011
allow_failures:
@@ -14,7 +15,7 @@ notifications:
1415
# uncomment the following lines to override the default test script
1516
#script:
1617
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
17-
# - julia -e 'Pkg.clone(pwd()); Pkg.build("ChainRules"); Pkg.test("ChainRules"; coverage=true)'
18+
# - julia -e 'Pkg.clone(pwd()); Pkg.build("AbstractChainRules"); Pkg.test("AbstractChainRules"; coverage=true)'
1819
after_success:
1920
# push coverage results to Coveralls
2021
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The ChainRules.jl package is licensed under the MIT "Expat" License:
1+
The AbstractChainRules.jl package is licensed under the MIT "Expat" License:
22

33
> Copyright (c) 2018: Jarrett Revels.
44
>

Project.toml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
name = "ChainRules"
2-
uuid = "082447d4-558c-5d27-93f4-14fc19e9eca2"
3-
version = "0.0.1"
1+
name = "AbstractChainRules"
2+
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
3+
version = "0.1.0"
44

55
[deps]
66
Cassette = "7057c7e9-c182-5462-911a-8362d720325c"
7-
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
8-
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
9-
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
10-
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
7+
118

129
[compat]
1310
Cassette = "^0.2"
14-
FDM = "^0.6"
1511
julia = "^1.0"
1612

1713
[extras]
18-
FDM = "e25cca7e-83ef-51fa-be6c-dfe2a3123128"
19-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
2014
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
15+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
2116

2217
[targets]
23-
test = ["FDM", "Random", "Test"]
18+
test = ["Test", "LinearAlgebra"]

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# ChainRules
1+
# AbstractChainRules
22

3-
[![Travis](https://travis-ci.org/JuliaDiff/ChainRules.jl.svg?branch=master)](https://travis-ci.org/JuliaDiff/ChainRules.jl)
4-
[![Coveralls](https://coveralls.io/repos/github/JuliaDiff/ChainRules.jl/badge.svg?branch=master)](https://coveralls.io/github/JuliaDiff/ChainRules.jl?branch=master)
5-
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://JuliaDiff.github.io/ChainRules.jl/latest)
3+
[![Travis](https://travis-ci.org/JuliaDiff/AbstractChainRules.jl.svg?branch=master)](https://travis-ci.org/JuliaDiff/AbstractChainRules.jl)
4+
[![Coveralls](https://coveralls.io/repos/github/JuliaDiff/AbstractChainRules.jl/badge.svg?branch=master)](https://coveralls.io/github/JuliaDiff/AbstractChainRules.jl?branch=master)
5+
[![](https://img.shields.io/badge/docs-latest-blue.svg)](https://JuliaDiff.github.io/AbstractChainRules.jl/latest)
66

7-
The ChainRules package provides a variety of common utilities that can be used by downstream automatic differentiation (AD) tools to define and execute forward-, reverse-, and mixed-mode primitives.
7+
The AbstractChainRules package provides a variety of common utilities that can be used by downstream automatic differentiation (AD) tools to define and execute forward-, reverse-, and mixed-mode primitives.
88

99
This package is a WIP; the framework is essentially there, but there are a bunch of TODOs, virtually no tests, etc. PRs welcome! Documentation is incoming, which should help if you'd like to contribute.
1010

@@ -18,4 +18,4 @@ Here are some of the basic goals for the package:
1818

1919
- Control-inverted design: rule authors can fully specify derivatives in a concise manner while naturally allowing the caller to compute only what they need.
2020

21-
The ChainRules source code follows the [YASGuide](https://github.com/jrevels/YASGuide).
21+
The AbstractChainRules source code follows the [YASGuide](https://github.com/jrevels/YASGuide).

REQUIRE

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/make.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
using ChainRules
1+
using AbstractChainRules
22
using Documenter
33

4-
makedocs(modules=[ChainRules],
5-
sitename="ChainRules",
4+
makedocs(modules=[AbstractChainRules],
5+
sitename="AbstractChainRules",
66
authors="Jarrett Revels and other contributors",
77
pages=["Introduction" => "index.md",
88
"Getting Started" => "getting_started.md",
9-
"ChainRules API Documentation" => "api.md"])
9+
"AbstractChainRules API Documentation" => "api.md"])
1010

11-
deploydocs(repo="github.com/JuliaDiff/ChainRules.jl.git")
11+
deploydocs(repo="github.com/JuliaDiff/AbstractChainRules.jl.git")

docs/src/api.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# ChainRules API Documentation
1+
# AbstractChainRules API Documentation
22

33
```@docs
4-
ChainRules.frule
5-
ChainRules.rrule
6-
ChainRules.AbstractRule
7-
ChainRules.Rule
8-
ChainRules.DNERule
9-
ChainRules.WirtingerRule
10-
ChainRules.accumulate
11-
ChainRules.accumulate!
12-
ChainRules.store!
4+
AbstractChainRules.frule
5+
AbstractChainRules.rrule
6+
AbstractChainRules.AbstractRule
7+
AbstractChainRules.Rule
8+
AbstractChainRules.DNERule
9+
AbstractChainRules.WirtingerRule
10+
AbstractChainRules.accumulate
11+
AbstractChainRules.accumulate!
12+
AbstractChainRules.store!
1313
```
1414

1515
```@docs
16-
ChainRules.AbstractDifferential
17-
ChainRules.extern
18-
ChainRules.Casted
19-
ChainRules.Wirtinger
20-
ChainRules.Thunk
21-
ChainRules.Zero
22-
ChainRules.DNE
23-
ChainRules.One
16+
AbstractChainRules.AbstractDifferential
17+
AbstractChainRules.extern
18+
AbstractChainRules.Casted
19+
AbstractChainRules.Wirtinger
20+
AbstractChainRules.Thunk
21+
AbstractChainRules.Zero
22+
AbstractChainRules.DNE
23+
AbstractChainRules.One
2424
```

docs/src/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
```@meta
2-
DocTestSetup = :(using ChainRules)
3-
CurrentModule = ChainRules
2+
DocTestSetup = :(using AbstractChainRules)
3+
CurrentModule = AbstractChainRules
44
```
55

6-
# ChainRules
6+
# AbstractChainRules
77

8-
Hello! Welcome to ChainRules's documentation.
8+
Hello! Welcome to AbstractChainRules's documentation.
99

10-
For an initial overview of ChainRules, please see the README. Otherwise, feel free to peruse available documentation via the sidebar.
10+
For an initial overview of AbstractChainRules, please see the README. Otherwise, feel free to peruse available documentation via the sidebar.

src/AbstractChainRules.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module AbstractChainRules
2+
using Cassette
3+
using Base.Broadcast: materialize, materialize!, broadcasted, Broadcasted, broadcastable
4+
5+
export AbstractRule, Rule, frule, rrule
6+
export @scalar_rule, @thunk
7+
export extern, cast, store!, Wirtinger, Zero, One, Casted, DNE, Thunk, DNERule
8+
9+
include("differentials.jl")
10+
include("rules.jl")
11+
end # module

src/ChainRules.jl

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)