Does BinaryBuilder allow Ryzen/Threadripper owners to choose MKL 2019 as the binary to use for MKL.jl and MKLSparse.jl?
Context
Back in 2019 the MKL libraries had a “loophole” that allowed AMD CPUs to take advantage of all the nifty engineering done by Intel by setting the env variable MKL_DEBUG_CPU_TYPE = 5. (In other words, the high MKL performance, it turned out, was not due to Intel hardware, but to their talented software team). That loophole was unfortunately closed by Intel with the 2020 version. It was argued that the reason was that they were adding actual support for AMD. Not so fast…
The great IT guys at my institute recently did a benchmark comparison of different MKL versions on different AMD (Threadripper and Ryzen) and Intel CPUs (i7, i9, Xeon), and found that (1) AMD often smokes Intel CPUs if they can make use of the loophole, and (2) after version 2020 they lost this advantage. Here are the results (an asterisk corresponds to not using MKL_DEBUG_CPU_TYPE = 5).
Thanks @giordano. Although that’s a no, I’ll mark it as the solution, as I guess the situation is unlikely to change. It’s a pity, but I do understand. The real way forward would be to have Intel open its hand or to have AMD up their game on the software side with BLIS/FLAME. It would be great to have BLIS.jl working with libblastrampoline, though. I think @viralbshah looked into that at some point.
I’m afraid that doesn’t seem to be enough. ] build MKL gets stuck at
(@v1.7) pkg> build MKL
Building MKL → `~/.julia/dev/MKL/deps/build.log`
┌ Warning: Could not use exact versions of packages in manifest, re-resolving
└ @ Pkg.Operations /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Pkg/src/Operations.jl:1488
Well, a deved MKL.jl does neither precompile nor build after the recommended changes. It’s not that it gives me a simple warning and finish when I try to build. It just hangs. If I try using MKL without building, it tries to precompile but never finishes either, and actually the REPL crashes if I try to ^C out of precompilation.
Since there is no error, I don’t know what to try next… Thanks in advance for any further ideas!
I don’t know, that package is so old that it isn’t even worth the effort trying to make it work if it doesn’t.
As a completely different approach, you can undevMKL.jl, install MKL_jll.jl 2021 regularly and override its artifact, to point to the directory where the artifact for MKL_jll 2019 is: JLL packages · BinaryBuilder.jl