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
IIUC ReverseDiff records broadcast and uses ForwardDiff to specialize further on broadcasted statements whenever possible, leading to much better performance than if one were to trace through all the operations using ReverseDiff.TrackedReal.
Unfortunately this means that once one tries to make use of Broadcast.broadcasted, i.e. lazy broadcasting, this is not recorded and we end up taking the less desirable path of tracing through the broadcast using ReverseDiff.TrackedReal:
but it's still slower than ForwardDiff (this of course varies wrt. input size, etc. but I'm guessing this perf difference is well-established given that basically all reverse-AD frameworks in Julia make use of ForwardDiff for broadcasting).
Would it be possible to record broadcasted instead of broadcast in ReverseDiff.jl (this is the way it's done in Zygote.jl)?
The text was updated successfully, but these errors were encountered:
IIUC ReverseDiff records
broadcast
and uses ForwardDiff to specialize further on broadcasted statements whenever possible, leading to much better performance than if one were to trace through all the operations usingReverseDiff.TrackedReal
.Unfortunately this means that once one tries to make use of
Broadcast.broadcasted
, i.e. lazy broadcasting, this is not recorded and we end up taking the less desirable path of tracing through the broadcast usingReverseDiff.TrackedReal
:The overhead can of course be lowered if the tape is compiled:
but it's still slower than ForwardDiff (this of course varies wrt. input size, etc. but I'm guessing this perf difference is well-established given that basically all reverse-AD frameworks in Julia make use of ForwardDiff for broadcasting).
Would it be possible to record
broadcasted
instead ofbroadcast
in ReverseDiff.jl (this is the way it's done in Zygote.jl)?The text was updated successfully, but these errors were encountered: