Skip to content

Commit 0fd107c

Browse files
committed
Shuffled gradient without prep
1 parent bad9cb5 commit 0fd107c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

DifferentiationInterface/src/first_order/gradient.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,19 @@ function shuffled_gradient(
133133
return gradient(f, prep, backend, x, rewrap(unannotated_contexts...)...)
134134
end
135135

136+
function shuffled_gradient!(
137+
grad,
138+
x,
139+
f::F,
140+
backend::AbstractADType,
141+
rewrap::Rewrap{C},
142+
unannotated_contexts::Vararg{Any,C},
143+
) where {F,C}
144+
gradient!(f, grad, backend, x, rewrap(unannotated_contexts...)...)
145+
return nothing
146+
end
147+
148+
#=
136149
function shuffled_gradient!(
137150
grad,
138151
x,
@@ -145,3 +158,4 @@ function shuffled_gradient!(
145158
gradient!(f, grad, prep, backend, x, rewrap(unannotated_contexts...)...)
146159
return nothing
147160
end
161+
=#

0 commit comments

Comments
 (0)