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
I have done some more profiling and found that the algebraic simplifier is still a huge cost sink. Worse, it is already so restricted that it barely ever does anything. Thus, I propose that we simply remove it entirely, and replace it with a very simple pattern-based rule that can handle the few bounds checks that are currently removed by the simplifier. In the future, we can bring it back in a better and faster form (it's also wrong in exotic cases right now).
As sample motivation, disabling the algebraic simplifier cuts the compile time of LocVolCalib (with incremental flattening) from over 9 seconds to about 5 seconds. Other benchmarks are similar.
The text was updated successfully, but these errors were encountered:
I have looked at bit at what it actually does for us at the moment. If we simply disable the algebraic simplifier, then a bunch of programs will need unsafe. The vast majority of cases are:
A loop or map over iota n where we are using the element to index an array of n elements.
A nested iota n where we must know that n is non-negative (and this is in fact guaranteed by some outer loops).
It should not be hard to create a much simpler and more efficient replacement that can handle just these cases.
I did not remove the algebraic simplifier, but I moved its usage into a separate pass that is only run once. The improvement in compiler speed is significant. The simplifier itself will remain for now, but I still do not like it.
I have done some more profiling and found that the algebraic simplifier is still a huge cost sink. Worse, it is already so restricted that it barely ever does anything. Thus, I propose that we simply remove it entirely, and replace it with a very simple pattern-based rule that can handle the few bounds checks that are currently removed by the simplifier. In the future, we can bring it back in a better and faster form (it's also wrong in exotic cases right now).
As sample motivation, disabling the algebraic simplifier cuts the compile time of LocVolCalib (with incremental flattening) from over 9 seconds to about 5 seconds. Other benchmarks are similar.
The text was updated successfully, but these errors were encountered: