-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP/RFC: Run LinearAlgebra tests with --compile=min. #34464
Conversation
1014383
to
6c34f6b
Compare
Some LinAlg tests take ages with |
6c34f6b
to
948221d
Compare
Doesn't look as clear-cut as expected:
|
We probably don't really want to run linalg tests with --compile=min, since it's just the sort of code you want optimized, so we should test the path that's usually used. It would also require using very small matrix sizes everywhere, but that's doable I suppose. |
Some tests, like LinearAlgebra/addmul, are pretty brute-forcey and don't really reflect actual usage (#34456 (comment)). Not compiling those dramatically lowers test times, e.g. on AArch64 from around 2500 to 5000 seconds (!!) to only 250. |
I know it takes a long time, but how confident are we that no change in LLVM or our codegen will ever break those tests? |
Maybe only on master and not on PRs then? Or, if we ever would decide to use bors (say, to fix JuliaCI/julia-buildbot#126) we could have different behavior on the |
Interesting to see the numbers. I'm really surprised that the triangular tests are slower with |
Anyway, with exception of |
Between this and some no-specialized experiments that Jameson did last year, we seem to have one lesson: simple "just don't compile" changes are not as effective as one might expect. The reliance on the speed of JIT code is too significant and diffuse to address like this. That points to really needing something significantly more clever like a tiered JIT approach in order to get the best of both worlds. |
That's right, but part of it is just that thoroughly testing a large amount of linear algebra code plus its compiler takes a long time. I don't think anybody believes you can test e.g. lapack or a C++ compiler in a couple minutes. The main question is what are we trying to test here? If we want to test LinearAlgebra and our compiler on that kind of code as thoroughly as possible, I suspect this is the cost. But if making CI faster is more important, the best approach would be to cut down how many cases we test (e.g. fewer element types, fewer/smaller matrix sizes, a sparser sampling of argument combinations, etc.) In any case the numbers here are indeed interesting! |
Implements JuliaLang/LinearAlgebra.jl#690. Has the same effect as #34456, too. Current approach introduces some non-determinism (whether tests are executed on the
--compile=min
worker or not), so that may not be wanted. Unless that flag is supposed to be non-breaking, in which case this would add some coverage?