by stabbles · 2y ago · 0 comments
Previous release miscompiled Python [1]
Current release miscompiles bison [2]
It's also the type of compiler that defaults to -ffast-math to look good in benchmarks (well, all vendor compilers do). That breaks many packages that rely on signalling NaNs, or use e.g. Kahan summation for stable math with IEEE floats.
It's caught in the Spack package manager because it's probably one of the few package managers that lets users pick their own compiler for a full software stack.
[1] https://github.com/spack/spack/issues/38724 and https://github.com/python/cpython/issues/106424
[2] https://github.com/spack/spack/issues/37172#issuecomment-181...
First issue was resolved, the bison issue is still pending.
> It was a compiler bug. The test now passes when cpython is built with an internal build. The next compiler release (likely 2024.0) should have the fix.
So I wouldn't recommend running FreeBSD on oneAPI in production just yet, but I give them some credit & celebrations for reaching a milestone.
Also note that before Intel oneAPI there was the now deprecated Intel Classic Compiler (icc), which also had bugs, since 2003.
In my opinion it's unlikely that a closed source vendor compiler will ever be on the same level as gcc and clang.
It will never be tested as much, and it's hard to make actionable bug reports for closed source software.
Being based on LLVM is of course a good choice... hopefully fewer bugs.
Fwiw icc once had a reputation for being fast but I never thought high of their software. Only hands on experience I had was with Intel Media SDK where even basic stuff, like finding a legal download, hardware requirements and installation guidance was tough. And then each iteration both software and hardware was deprecated faster than Google can dream to abandon their products.
Aside from some GUI scaling issues on Linux, I was really impressed by Intel Vtune.
Also, some of their low level libraries like Xed and Pin Tools are pretty cool, and seemed (last I looked) well-maintained.
Plenty of bugs in gcc and llvm. I'm really sure a closed source compiler could be higher quality. Probably not in the C++ world, but I expect there's an ADA compiler out there that gets the answer right whatever the source code is.
But it's a problem of the language really.
Alias analysis in Fortran is much easier than in C / C++.
Also I'm reasonably sure that Rust's borrow checker could be used for alias analysis and improve performance without making unsafe assumptions, no clue if that is actually done.
For reordering of floating point numbers, there should just be clear demarcations in code where it's safe. It's ridiculous that `-ffast-math` works on the level of the command line. But I think that ship has sailed, cause although clang has supports pragma's, it's not a standard:
#pragma clang fp exceptions(strict)Not sure if they're still doing that, but in the early days of Clear Linux they were using -ffast-math on everything they compiled, as a way to give their distro a big performance boost over competition, too.
But in benchmarks you sometimes see like a 4x speedup compared to ubuntu, which is obviously not due to superior compilers.
For example:
https://github.com/phoronix-test-suite/phoronix-test-suite/i...