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
{{ message }}
Repository navigation
@grad fails for qualified function names (gensym(::Expr)) #318
Expected: this defines the rule, like it does for an unqualified name. Qualified names are the normal way to add a rule for a function you don't own, e.g. a Base or LinearAlgebra function for your own array type. @grad_from_chainrules LinearAlgebra.dot(...) already handles them.
Cause:closure = gensym(f) assumes f is a Symbol. A plain gensym(:grad) (or gensym()) would be enough. This is the same line as #135 (callable structs), but a fix for that issue alone won't necessarily cover this case.
ReverseDiff master (b796032, v1.18.4), Julia 1.13.1.
Activity
gezerui888 commentedon Nov 7, 2026
I'd like to fix this. I reproduced the qualified-name failure and have a fix with regression tests ready.