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
@@ -94,12 +94,9 @@ This is a backend-specific procedure, but we expose a common syntax to achieve i
94
94
If you run `prepare_operator(backend, f, x)`, it will create an object called `extras` containing the necessary information to speed up `operator` and its variants.
95
95
This information is specific to `backend` and `f`, as well as the _type and size_ of the input `x`, but it should work with different _values_ of `x`.
96
96
97
-
You can then call `operator(backend, f, similar_x, extras)`, which should be faster than `operator(backend, f, similar_x)`.
97
+
You can then call `operator(backend, f, x2, extras)`, which should be faster than `operator(f, backend, x2)`.
98
98
This is especially worth it if you plan to call `operator` several times in similar settings: you can think of it as a warm up.
99
99
100
-
By default, all the preparation functions return `nothing`.
101
-
We do not make any guarantees on their implementation for each backend, or on the performance gains that can be expected.
102
-
103
100
!!! warning
104
101
For `SecondOrder` backends, the inner differentiation cannot be prepared at the moment, only the outer one is.
105
102
@@ -123,12 +120,13 @@ This means the Hessian is obtained as the sparse Jacobian of the gradient.
123
120
124
121
### Split reverse mode
125
122
126
-
Many reverse mode AD backends expose a "split" option, which runs only the forward sweep, and encapsulates the reverse sweep in a closure.
127
-
We make this available for allocating functions only, with the following operators:
123
+
Some reverse mode AD backends expose a "split" option, which runs only the forward sweep, and encapsulates the reverse sweep in a closure.
124
+
We make this available for all backends with the following operators:
Copy file name to clipboardExpand all lines: DifferentiationInterface/ext/DifferentiationInterfaceChainRulesCoreExt/DifferentiationInterfaceChainRulesCoreExt.jl
0 commit comments