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
functiontaylor(x, N)
sum =0* x
for i =1:N
sum += x^i / i
endreturn sum
end
Shows pretty poor performance in Diffractor. I've created a gist that contains a Project, Manifest and test script to showcase the issue. You can increase N to get harder and harder problems. Note that I was unable to get Enzyme working on master (perhaps I need to check out the master branch) and Diffractor dies with a stack overflow if N is too large.
For N=10^4, we get timings of Enzyme's code running in <1ms, and Diffractor taking more than 300ms. Zygote and ForwardDiff are both well under 10ms.
The text was updated successfully, but these errors were encountered:
For my own edification, wouldn't Diffractor have to fully inline all pullbacks here and determine that the number of iterations in reverse is bounded by N? Otherwise I'd imagine large loops like this are a worst-case scenario for the linked list of pullbacks approach currently employed.
In Chris' recent SciML video, at this timestamp he showcases a little AD benchmark. Summarizing, differentiating the function:
Shows pretty poor performance in
Diffractor
. I've created a gist that contains a Project, Manifest and test script to showcase the issue. You can increaseN
to get harder and harder problems. Note that I was unable to get Enzyme working onmaster
(perhaps I need to check out themaster
branch) and Diffractor dies with a stack overflow ifN
is too large.For
N=10^4
, we get timings of Enzyme's code running in <1ms, and Diffractor taking more than 300ms. Zygote and ForwardDiff are both well under 10ms.The text was updated successfully, but these errors were encountered: