JuliaData / CSV.jl

Utility library for working with CSV and other delimited files in the Julia programming language
https://csv.juliadata.org/
Other
470 stars 140 forks source link

Segfault on Julia 1.9 on Intel Sapphire Rapids during precompilation #1113

Open BioTurboNick opened 11 months ago

BioTurboNick commented 11 months ago

I recently started using an AWS server using an Intel Sapphire Rapids CPU. When I installed Julia 1.9 on it, CSV segfaulted during precompilation (https://github.com/JuliaLang/julia/issues/51482). This is apparently due to issues with LLVM 14 and Float16 instructions; Float16 generally is broken for this combination of software and hardware (https://github.com/JuliaLang/julia/issues/51686). Julia 1.8 (LLVM 13) and Julia 1.10 (LLVM 15) do not have this issue.

The precompilation crash is specifically due to compiling the following line. If I change the target type to Float32, precompilation works fine.

https://github.com/JuliaData/CSV.jl/blob/cb1b411f893e8e8cc120544ce629e07d25f2fb50/src/file.jl#L618

It's clearly an issue for LLVM/Julia to fix ultimately, but hard to know how long that will take; also possible that the fix would be too hard, and the "solution" would be to move to Julia 1.10.

But if there's anything that could be done to provide an easy workaround, even just to allow everything to work so long as someone isn't using Float16s?