-
Notifications
You must be signed in to change notification settings - Fork 119
[WIP] Use Enzyme.jl for constant optimization #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
| else | ||
| l(i) = loss(x[i], y[i], w[i]) | ||
| return sum(l, eachindex(x)) / sum(w) | ||
| return sum(@. loss(x, y, w)) / sum(w) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to avoid this, but it seems like sum is using the dataset array for temporary storage somehow? (Or Enzyme.jl thinks it is?)
|
Moved to #326 |
Requires: SymbolicML/DynamicExpressions.jl#52
This attempts to use Reverse-mode Enzyme.jl for constant optimization which seems to get a nice speedup.
There are also some other issues which I will continue debugging, like:
which is from interference with LoopVectorization.jl. In principle the
-O2pass should remove the LoopVectorization.jl code asturbo=falseis a constant.