Skip to content

Commit

Permalink
Reinsert reverse mode gradient docstring (#2311)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Feb 16, 2025
1 parent 4a5316e commit e12bf1f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/sugar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,13 @@ grad = gradient(ReverseWithPrimal, mul, [2.0], Const([3.0]))
```
"""
# TODO eventually add an invalidation edge here from inactive_type
@generated function gradient(
rm::ReverseMode{ReturnPrimal,RuntimeActivity,ABI,Holomorphic,ErrIfFuncWritten},
f::F,
x::ty_0,
args::Vararg{Any,N},
) where {F,ty_0,ReturnPrimal,RuntimeActivity,ABI,Holomorphic,ErrIfFuncWritten,N}
# TODO eventually add an invalidation edge here from inactive_type
rargs = Union{Symbol,Expr}[:x]
gentys = Type[x]
acts = Symbol[Symbol("act_0")]
Expand Down Expand Up @@ -1159,4 +1159,3 @@ grad
)
return nothing
end

0 comments on commit e12bf1f

Please sign in to comment.