Skip to content

Commit 103b3c1

Browse files
authored
Add Symbolics to backend docs (#247)
1 parent 3d6e41a commit 103b3c1

2 files changed

Lines changed: 40 additions & 5 deletions

File tree

DifferentiationInterface/docs/src/backends.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,19 @@ CollapsedDocStrings = true
77
using DifferentiationInterface
88
using DifferentiationInterface: backend_str
99
import Markdown
10-
import Diffractor, Enzyme, FastDifferentiation, FiniteDiff, FiniteDifferences, ForwardDiff, PolyesterForwardDiff, ReverseDiff, Tapir, Tracker, Zygote
10+
11+
import Diffractor
12+
import Enzyme
13+
import FastDifferentiation
14+
import FiniteDiff
15+
import FiniteDifferences
16+
import ForwardDiff
17+
import PolyesterForwardDiff
18+
import ReverseDiff
19+
import Symbolics
20+
import Tapir
21+
import Tracker
22+
import Zygote
1123
1224
const backend_examples = (
1325
"AutoDiffractor()",
@@ -19,6 +31,7 @@ const backend_examples = (
1931
"AutoForwardDiff()",
2032
"AutoPolyesterForwardDiff(; chunksize=1)",
2133
"AutoReverseDiff()",
34+
"AutoSymbolics()",
2235
"AutoTapir()",
2336
"AutoTracker()",
2437
"AutoZygote()",

DifferentiationInterface/docs/src/overloads.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Table of overloads
22

33
As described in the [overview](@ref sec-overview), DifferentiationInterface provides multiple high-level operators like [`jacobian`](@ref),
4-
each with several variants:
4+
each with several variants:
5+
56
* **out-of-place** or **in-place** return values
67
* **with** or **without primal** output value
78
* support for **one-argument functions** `y = f(x)` or **two-argument functions** `f!(y, x)`
@@ -14,9 +15,9 @@ When available, DifferentiationInterface **always** calls these backend-specific
1415
The following tables summarize all implemented overloads for each backend.
1516
Each cell can have three values:
1617

17-
- ❌: the operator is not overloaded because the backend does not support it
18-
- ✅: the operator is overloaded
19-
- NA: the operator does not exist
18+
* ❌: the operator is not overloaded because the backend does not support it
19+
* ✅: the operator is overloaded
20+
* NA: the operator does not exist
2021

2122
!!! tip
2223
Check marks (✅) are clickable and link to the source code.
@@ -26,13 +27,15 @@ using ADTypes: AbstractADType
2627
using DifferentiationInterface
2728
using DifferentiationInterface: backend_str, twoarg_support, TwoArgSupported
2829
using Markdown: Markdown
30+
2931
using Diffractor: Diffractor
3032
using Enzyme: Enzyme
3133
using FastDifferentiation: FastDifferentiation
3234
using FiniteDiff: FiniteDiff
3335
using FiniteDifferences: FiniteDifferences
3436
using ForwardDiff: ForwardDiff
3537
using PolyesterForwardDiff: PolyesterForwardDiff
38+
using Symbolics: Symbolics
3639
using ReverseDiff: ReverseDiff
3740
using Tapir: Tapir
3841
using Tracker: Tracker
@@ -88,6 +91,7 @@ function operators_and_types_f(backend::T) where {T<:AbstractADType}
8891
),
8992
)
9093
end
94+
9195
function operators_and_types_f!(backend::T) where {T<:AbstractADType}
9296
return (
9397
(
@@ -166,61 +170,79 @@ end
166170
```
167171

168172
## Diffractor (forward/reverse)
173+
169174
```@example overloads
170175
print_overloads(AutoDiffractor(), :DifferentiationInterfaceDiffractorExt) # hide
171176
```
172177

173178
## Enzyme (forward)
179+
174180
```@example overloads
175181
print_overloads(AutoEnzyme(; mode=Enzyme.Forward), :DifferentiationInterfaceEnzymeExt) # hide
176182
```
177183

178184
## Enzyme (reverse)
185+
179186
```@example overloads
180187
print_overloads(AutoEnzyme(; mode=Enzyme.Reverse), :DifferentiationInterfaceEnzymeExt) # hide
181188
```
182189

183190
## FastDifferentiation (symbolic)
191+
184192
```@example overloads
185193
print_overloads(AutoFastDifferentiation(), :DifferentiationInterfaceFastDifferentiationExt) # hide
186194
```
187195

188196
## FiniteDiff (forward)
197+
189198
```@example overloads
190199
print_overloads(AutoFiniteDiff(), :DifferentiationInterfaceFiniteDiffExt) # hide
191200
```
192201

193202
## FiniteDifferences (forward)
203+
194204
```@example overloads
195205
print_overloads(AutoFiniteDifferences(; fdm=FiniteDifferences.central_fdm(3, 1)), :DifferentiationInterfaceFiniteDifferencesExt) # hide
196206
```
197207

198208
## ForwardDiff (forward)
209+
199210
```@example overloads
200211
print_overloads(AutoForwardDiff(), :DifferentiationInterfaceForwardDiffExt) # hide
201212
```
202213

203214
## PolyesterForwardDiff (forward)
215+
204216
```@example overloads
205217
print_overloads(AutoPolyesterForwardDiff(; chunksize=1), :DifferentiationInterfacePolyesterForwardDiffExt) # hide
206218
```
207219

208220
## ReverseDiff (reverse)
221+
209222
```@example overloads
210223
print_overloads(AutoReverseDiff(), :DifferentiationInterfaceReverseDiffExt) # hide
211224
```
212225

226+
## Symbolics (symbolic)
227+
228+
```@example overloads
229+
print_overloads(AutoSymbolics(), :DifferentiationInterfaceSymbolicsExt) # hide
230+
```
231+
213232
## Tapir (reverse)
233+
214234
```@example overloads
215235
print_overloads(AutoTapir(), :DifferentiationInterfaceTapirExt) # hide
216236
```
217237

218238
## Tracker (reverse)
239+
219240
```@example overloads
220241
print_overloads(AutoTracker(), :DifferentiationInterfaceTrackerExt) # hide
221242
```
222243

223244
## Zygote (reverse)
245+
224246
```@example overloads
225247
print_overloads(AutoZygote(), :DifferentiationInterfaceZygoteExt) # hide
226248
```

0 commit comments

Comments
 (0)