@@ -110,24 +110,28 @@ function prepare_pushforward(f!::F, y, backend::AbstractADType, x, dx) where {F}
110110 return prepare_pushforward_aux (f!, y, backend, x, dx, pushforward_performance (backend))
111111end
112112
113- function prepare_pushforward_aux (f:: F , backend, x, dx, :: PushforwardSlow ) where {F}
113+ function prepare_pushforward_aux (
114+ f:: F , backend:: AbstractADType , x, dx, :: PushforwardSlow
115+ ) where {F}
114116 y = f (x)
115117 dy = y isa Number ? one (y) : basis (backend, y, first (CartesianIndices (y)))
116118 pullback_extras = prepare_pullback (f, backend, x, dy)
117119 return PullbackPushforwardExtras (pullback_extras)
118120end
119121
120- function prepare_pushforward_aux (f!:: F , y, backend, x, dx, :: PushforwardSlow ) where {F}
122+ function prepare_pushforward_aux (
123+ f!:: F , y, backend:: AbstractADType , x, dx, :: PushforwardSlow
124+ ) where {F}
121125 dy = y isa Number ? one (y) : basis (backend, y, first (CartesianIndices (y)))
122126 pullback_extras = prepare_pullback (f!, y, backend, x, dy)
123127 return PullbackPushforwardExtras (pullback_extras)
124128end
125129
126- function prepare_pushforward_aux (f, backend, x, dy , :: PushforwardFast )
130+ function prepare_pushforward_aux (f, backend:: AbstractADType , x, dx , :: PushforwardFast )
127131 throw (MissingBackendError (backend))
128132end
129133
130- function prepare_pushforward_aux (f!, y, backend, x, dy , :: PushforwardFast )
134+ function prepare_pushforward_aux (f!, y, backend:: AbstractADType , x, dx , :: PushforwardFast )
131135 throw (MissingBackendError (backend))
132136end
133137
180184# ## With extras
181185
182186function value_and_pushforward (
183- f:: F , backend, x, dx, extras:: PullbackPushforwardExtras
187+ f:: F , backend:: AbstractADType , x, dx, extras:: PullbackPushforwardExtras
184188) where {F}
185189 @compat (; pullback_extras) = extras
186190 y = f (x)
248252# ## With extras
249253
250254function value_and_pushforward (
251- f!:: F , y, backend, x, dx, extras:: PullbackPushforwardExtras
255+ f!:: F , y, backend:: AbstractADType , x, dx, extras:: PullbackPushforwardExtras
252256) where {F}
253257 @compat (; pullback_extras) = extras
254258 dy = if x isa Number && y isa AbstractArray
0 commit comments