-
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
LoopVectorization.jl causing segfaults on 1.11 #525
Comments
A few people expressed disappointment at deprecating this library. Otherwise, we should proceed on the deprecation plan. Unfortunately, RFLU is still much faster than MKL below the 200x200 point on many people's computers
This stack is a major contributor to compile times, and does not precompile well: it is a frequent source of bugs where precompiled code allocates, but recompiling it in a running REPL with Revise (through making meaningless changes) make those allocations go away. |
I'm slightly tempted to try to take over maintenance, but I fear that if the maintenance burden has become unsustainable for you it'll just be that much more unsustainable for me. What was the Clima folks' apparent objection, out of curiosity? |
It really shouldn't take much effort. |
I believe the segfaults in the tests from VectorizedReductions.jl and NaNStatistics.jl are caused by reducing over empty collections which leads to code along the lines of A = Float64[]
out = zero(eltype(A))
@turbo for i in eachindex(A)
out += A[i]
end LoopVectorization warns users not to do this, so the problem lies with VectorizedReductions and NaNStatistics (here it's the weighted versions of each statistic that has problems, unweighted stats correctly add the I have not verified it, but I suspect PlmDCA has a similar problem. A quick search of the code reveals that it checks for empty collections in some places, but not others. |
Closing this because tests pass on 1.11, while |
LoopVectorization.jl's generated IR seems to cause segfaults on 1.11, as observed on PkgEval with at least 6 packages (MCPhylo,jl, LocalPoly.jl, VectorizedReduction.jl, NaNStatistics.jl, TimeSeriesClassification.jl, PlmDCA.jl). See this report for details: https://s3.amazonaws.com/julialang-reports/nanosoldier/pkgeval/by_hash/2cbecf4_vs_18b4f3f/report.html
@chriselrod I'm opening a new issue because #518 was closed, and to list all issues in case somebody wants to tackle this.
Some of the errors that I've encountered:
An LLVM assertion, as seen with MCPhylo.jl (requires assertions build of Julia):
A segfault during
vload
, as seen with NaNStatistics.jl and PlmDCA.jl:A segfault during
vadd_fast
as seen with VectorizedReductions.jl:The source of bad IR hasn't been fully determined yet, but it seems to be the
Expr(:new)
that's generated to pass structs by value instead of by reference: JuliaLang/julia#52702 (comment).Deprecating LoopVectorization.jl isn't possible, because:
@turbo
changes semantics, Deprecate on 1.11 #523 (comment)So the only solution forwards seems fixing LoopVectorization.jl. I've taken a first attempt at it in #523, but just removing the
Expr(:new)
optimization isn't sufficient, and there's other issues (see above).The text was updated successfully, but these errors were encountered: