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
Performance regression due to absence of lto #2008
The freshly merged static matrix refactor things do slow down stan programs significantly whenever lto is not turned on.
So as of now in the static matrix world we absolutely need the lto optimisation for good performance. Thus, our makefiles should ideally switch on lto whenever the compiler is capable enough of handling it. The user should not be required to add -flto to the make/local to get good performance
So yes I'm working on this right now. I decided to toss the idea of using flto for clang-6 or 7 (it's very hard to tell which version you are on). So as long as the user is using gcc >= 5.0 and clang > 7 we should have everything plus a few extra wizzes and woos we can turn on
It's taking me a minute because a few compiler settings + flto can actually lead to a slow-down(!) / wrong values on the performance tests. My guess is that too many optimizations + flto is causing too much inlining and some other algebra optims can cause slightly different numerics
Activity
SteveBronder commentedon Aug 12, 2020
So yes I'm working on this right now. I decided to toss the idea of using flto for clang-6 or 7 (it's very hard to tell which version you are on). So as long as the user is using
gcc >= 5.0andclang > 7we should have everything plus a few extra wizzes and woos we can turn onIt's taking me a minute because a few compiler settings + flto can actually lead to a slow-down(!) / wrong values on the performance tests. My guess is that too many optimizations + flto is causing too much inlining and some other algebra optims can cause slightly different numerics
SteveBronder commentedon Aug 18, 2020
@wds15 can you throw the model and data up into a gist? If not feel free to email it to me
rok-cesnovar commentedon Aug 24, 2020
This will be fixed with an upstream PR, so reopening this until that happens.