Skip to content

Commit c6c8fc2

Browse files
authored
Add second forward output and autodiff backend extensions (#40)
* Restructure with extensions for ForwardDiff and Enzyme * Some fixes * Bump version * Double output everywhere * Fix pullback due to tuple output * Avoid code duplication * Move chainrules machinery to extension, remove Enzyme * Redo documentation and add first complete tutorial * Re-add tests on earlier versions * Not strict docs * Build on PR * Add link to stable doc * Allow CI failures on nightly * Repopulate docs * Fix tests on 1.6 * Fix typo in docs
1 parent 05ff9b7 commit c6c8fc2

25 files changed

+888
-827
lines changed

.github/workflows/CI.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ on:
33
push:
44
branches:
55
- main
6-
tags: '*'
6+
tags:
7+
- '*'
78
pull_request:
89
concurrency:
910
# Skip intermediate builds: always.
@@ -17,14 +18,15 @@ jobs:
1718
strategy:
1819
fail-fast: false
1920
matrix:
20-
version:
21-
- '1.7'
22-
- '1.8'
23-
- '~1.9.0-0'
24-
os:
25-
- ubuntu-latest
26-
arch:
27-
- x64
21+
version: ['1.6', '1']
22+
os: [ubuntu-latest]
23+
arch: [x64]
24+
allow_failure: [false]
25+
include:
26+
- version: 'nightly'
27+
os: ubuntu-latest
28+
arch: x64
29+
allow_failure: true
2830
steps:
2931
- uses: actions/checkout@v2
3032
- uses: julia-actions/setup-julia@v1

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
*.jl.mem
44
/Manifest.toml
55
/docs/build/
6-
docs/src/examples/*.md
6+
docs/src/examples/*.md
7+
test/playground.jl

CITATION.bib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ @misc{ImplicitDifferentiation.jl
22
author = {Guillaume Dalle, Mohamed Tarek and contributors},
33
title = {ImplicitDifferentiation.jl},
44
url = {https://github.com/gdalle/ImplicitDifferentiation.jl},
5-
version = {v0.3.0},
5+
version = {v0.4.0},
66
year = {2023},
7-
month = {3}
7+
month = {4}
88
}

Project.toml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,49 @@
11
name = "ImplicitDifferentiation"
22
uuid = "57b37032-215b-411a-8a7c-41a003a55207"
33
authors = ["Guillaume Dalle", "Mohamed Tarek and contributors"]
4-
version = "0.3.0"
4+
version = "0.4.0"
55

66
[deps]
7+
AbstractDifferentiation = "c29ec348-61ec-40c8-8164-b8c60e9d9f3d"
78
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
89
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
910
LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
11+
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
1012

1113
[compat]
14+
AbstractDifferentiation = "0.5"
1215
ChainRulesCore = "1.14"
16+
ForwardDiff = "0.10"
1317
Krylov = "0.8, 0.9"
1418
LinearOperators = "2.2"
15-
julia = "1.7"
19+
Requires = "1.3"
20+
julia = "1.6"
21+
22+
[extensions]
23+
ImplicitDifferentiationChainRulesExt = "ChainRulesCore"
24+
ImplicitDifferentiationForwardDiffExt = "ForwardDiff"
1625

1726
[extras]
1827
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
1928
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
2029
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
21-
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
22-
Convex = "f65535da-76fb-5f13-bab9-19810c17039a"
23-
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
2430
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
25-
FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000"
2631
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
27-
ForwardDiffChainRules = "c9556dd2-1aed-4cfe-8560-1557cf593001"
2832
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
2933
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
3034
Krylov = "ba0b0d4f-ebba-5204-a429-3ac8c609bfb7"
3135
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
32-
LinearOperators = "5c8ed15e-5a4c-59e4-a42b-c7e8811fb125"
33-
MathOptInterface = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
34-
MathOptSetDistances = "3b969827-a86c-476c-9527-bb6f1a8fbad5"
36+
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
3537
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
3638
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
3739
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
38-
SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13"
3940
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
4041
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4142
Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f"
4243

4344
[targets]
44-
test = ["Aqua", "ChainRulesCore", "ChainRulesTestUtils", "ComponentArrays", "Convex", "Distances", "Documenter", "FiniteDifferences", "ForwardDiff", "ForwardDiffChainRules", "JET", "JuliaFormatter", "LinearAlgebra", "LinearOperators", "MathOptInterface", "MathOptSetDistances", "Optim", "Pkg", "Random", "SCS", "SparseArrays", "Test", "Zygote"]
45+
test = ["Aqua", "ChainRulesCore", "ChainRulesTestUtils", "Documenter", "ForwardDiff", "JET", "JuliaFormatter", "LinearAlgebra", "NLsolve", "Optim", "Pkg", "Random", "SparseArrays", "Test", "Zygote"]
46+
47+
[weakdeps]
48+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
49+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ImplicitDifferentiation.jl
22

3-
<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://gdalle.github.io/ImplicitDifferentiation.jl/stable) -->
3+
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://gdalle.github.io/ImplicitDifferentiation.jl/stable)
44
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://gdalle.github.io/ImplicitDifferentiation.jl/dev)
55
[![Build Status](https://github.com/gdalle/ImplicitDifferentiation.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/gdalle/ImplicitDifferentiation.jl/actions/workflows/CI.yml?query=branch%3Amain)
66
[![Coverage](https://codecov.io/gh/gdalle/ImplicitDifferentiation.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/gdalle/ImplicitDifferentiation.jl)

0 commit comments

Comments
 (0)