You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DifferentiationInterface/docs/src/overview.md
+13-19Lines changed: 13 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,16 +62,16 @@ However they have different signatures:
62
62
In many cases, AD can be accelerated if the function has been run at least once (e.g. to create a config or record a tape) and if some cache objects are provided.
63
63
This is a backend-specific procedure, but we expose a common syntax to achieve it.
Unsurprisingly, preparation syntax depends on the number of arguments:
77
77
@@ -89,6 +89,9 @@ This is especially worth it if you plan to call `operator` several times in simi
89
89
!!! warning
90
90
The `extras` object is nearly always mutated when given to an operator, even when said operator does not have a bang `!` in its name.
91
91
92
+
With `pushforward`, `pullback` and `hvp`, you can also choose to prepare for the same point `x`, assuming only the seed `v` will change.
93
+
Such is the purpose of `prepare_operator_same_point(f, backend, x, v)`, which is otherwise similar to standard preparation.
94
+
92
95
### Second order
93
96
94
97
We offer two ways to perform second-order differentiation (for [`second_derivative`](@ref), [`hvp`](@ref) and [`hessian`](@ref)):
@@ -115,15 +118,6 @@ We offer two ways to perform second-order differentiation (for [`second_derivati
115
118
Just wrap it around any backend, with an appropriate choice of sparsity detector and coloring algorithm, and call `jacobian` or `hessian`: the result will be sparse.
116
119
See the [tutorial section on sparsity](@ref sparsity-tutorial) for details.
117
120
118
-
### Split reverse mode
119
-
120
-
Some reverse mode AD backends expose a "split" option, which runs only the forward sweep, and encapsulates the reverse sweep in a closure.
121
-
We make this available for all backends with the following operators:
Copy file name to clipboardExpand all lines: DifferentiationInterface/ext/DifferentiationInterfaceChainRulesCoreExt/DifferentiationInterfaceChainRulesCoreExt.jl
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,8 @@ using ChainRulesCore:
11
11
rrule_via_ad
12
12
using Compat
13
13
import DifferentiationInterface as DI
14
-
using DifferentiationInterface: DifferentiateWith, NoPullbackExtras, NoPushforwardExtras
0 commit comments