-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add option to not reorder loops? #459
Comments
I agree. LoppModels (the rewrite) of avoiding the factorial behavior. There is #398, but I didn't actually notice it helping for some reason. It's worth looking more into.
#398 is simple enough, and avoids the factorial algorithm. |
Maybe the logic to actually skip the factorial behavior is broken in #398. |
I am doing some more investigation into my slow compile times, and I think that it may actually have more to do with LLVM being quite slow to deal with high-dimensional arrays than with LV--the compile time for my generated function is extremely slow even with no |
Are you generating tons of unrolled code? JULIA_LLVM_ARGS="-time-passes" julia It may also be useful to look into the Julia compiler itself. |
As noted in #126 and in my own usage of the library, compile time is roughly factorial in the number of nested loops. For many applications, it is not too hard to guess a loop ordering that should be good enough. For example, consider this set of 6 nested loops:
The indices
λx, λy
etc. are larger strides than the indicesαx, αv
. So we probably shouldn't even consider loop orders where the alphas are outside. In terms of ordering the outer loops, I think that a human should be able to do a pretty good job just based on the way the data is laid out in memory. It would be nice to be able to take advantage of the automatic unrolling and vectorization capabilities of LV without incurring a compile time blowup.Is this a feasible suggestion based on how the library is structured right now?
The text was updated successfully, but these errors were encountered: