11 ms·
That's not cheating. There are two problems here. The first problem is that AMD does not provide versions of those libraries tuned for AMD hardware. The inves
by fluffything 7y ago
That's not cheating.
There are two problems here.
The first problem is that AMD does not provide versions of those libraries tuned for AMD hardware. The investment of AMD into software for their hardware is close to zero, and without software, hardware is irrelevant. AMD has this problem when competing against nvidia in the GPU space, and against intel in the CPU space.
The second problem is that buyers of AMD products demand that Intel would release their software optimized for AMD products as well, which is just nonsensical. First, Intel is not required to do this and have no reason to do so - if this software doesn't work for your hardware, either buy Intel, or use something else. Second, these people don't expect AMD to provide these libraries, and aren't willing to provide them themselves, so... combined with AMD culture of not investing in software, nothing will happen.
That link is 10 years old, but these issues are at least 10 years older. That is, AMD has had 20 years to fix this, and nothing has happened.
I mean, this might sound like captain obvious, but Intel and Nvidia have super good profilers for their hardware (VTune and Nsight). AMD provides uProf, which sucks, so if that is what their engineers are using for their libraries, it isn't a surprise that they don't perform good.
- bitL 7y agoThey commit patches to OpenBLAS which is still 2-3x slower on Zen 2 than MKL on Intel hardware. Intel has better software engineers for high-performance math it seems.
- fluffything 7y ago> Intel has better software engineers for high-performance math it seems. Intel has software engineers for pretty much every application. AMD has very few software engineers.
- bitL 7y agoYeah, that's quite unfortunate, however as AMD seems to be able to earn some $ in the following ~2 years they might go on SWE hiring spree...
- jonhendry18 7y agoOr drive a truck full of money to Intel HQ to pay them to do it. Probably need to be a lot of money though.
- tutanchamun 7y agoI think much of that will flow into their GPU department. They have the node advantage compared to Nvidia (TSMC 7nm vs. TSMC 12nm) but can only match Nvidia in power consumption and performance. Once Nvidia get's to 7nm with their new architecture they will increase the gap again (unless RDNA2 which is rumored for H1 2020 brings a big efficiency and performance improvement - and not only hardware accelerated RT).
- chrchang523 7y agoAOCL (https://developer.amd.com/amd-aocl/ https://developer.amd.com/amd-aocl/ ) is also a thing that exists. But yes, they are generally way behind in this area, and in my domain (genomics) this is a serious barrier to adoption. I've been waiting for years for good-enough AMD-optimized linear algebra libraries, but distribution of Linux binaries statically linked to Intel MKL is still the obvious best choice as of November 2019, and that's a shame.
- galeos 7y agoMATLAB (which I think uses Intel MKL) showing faster performance for Intel than AMD but apparently due the above issues of the MKL libraries not utilising AVX on AMD processors? Is this correct? https://www.extremetech.com/computing/302546-amd-threadripper-3970x-3960x-intel-10980xe-cascade-lake-cpu-review https://www.extremetech.com/computing/302546-amd-threadrippe...
- sliken 7y agoYes, it's correct. But it's easy to fix, just do this: export MKL_DEBUG_CPU_TYPE=5 Depending on the benchmark, I've seen up to 6.6x improvement in matlab on the AMD Rome/Zen2 chips
- burnte 7y ago> The second problem is that buyers of AMD products demand that Intel would release their software optimized for AMD products as well, which is just nonsensical. First, Intel is not required to do this and have no reason to do so - if this software doesn't work for your hardware, either buy Intel, or use something else. While Intel isn't REQUIRED to do so, it absolutely is a sensible thing to do. If my customers need something, I want to provide it to them. If my customers want me to add a feature that makes their products run well on competitors' CPUs, then its in my best interest to make that happen, if I can get the other CPU maker to give me the data I need. This makes my direct customer happy, makes me look good for prospective customers, and builds loyalty to my brand. It also makes my customer happy by making THEIR customers happy, which keeps them customers of mine.
- usefulcat 7y agoAll of those points would be a lot more relevant if Intel were a software company, or if it at least got a significant portion of it's revenue from software sales. I very much doubt that's the case though.
- burnte 7y agoThey make the compiler to make their CPUs more attractive.
- headmelted 7y agoWhile I would like this issue resolved I'm not sure I follow your logic at all that Intel should be the people to fix it. When there are only two viable options in a marketplace, offering improvements to make your direct competitor's product better than yours is shooting yourself in the foot. Your point about happy customers would make sense if Intel was selling all manner of service contracts and extraneous engagements with it's consumer base, but is it? I'm pretty sure the chip business is speed / cost and that's all. What's ironic is that AMD knows better than any tech company I can think of exactly what the rewards are for coming second in the chip game.
- berkut 7y agoI totally buy that Intel should use the feature flags instead of checking the CPUid name for stuff like AVX, FMA, etc... However, ICC does support several advanced optimisations whereby it literally schedules instructions based on expert knowledge of architecture cycle latency and number of ports: LLVM and GCC have similar tables for overall stats which I think AMD contribute to, but ICC can also hook in memory and cache bandwidth / latency to schedule instructions: this by definition would need to be Intel-specific, unless AMD were happy to give Intel this information. So some of the optimisations are by definition Intel-only. The question really is how fair should the fall-backs be.
- Dylan16807 7y ago> buyers of AMD products demand that Intel would release their software optimized for AMD products as well, No, not at all. They want to run the Intel-optimized version. But instead it checks CPUID and runs a deoptimized version.
- neonate 7y agoWow. Are you sure? How do you know this?
- aidenn0 7y agoCentaurTechnologies ran benchmarks against ICC with the CPUID set to the default and then with it set to the name of an Intel chip with equivalent CPU flags. Intel's response was roughly "We don't trust CPU flags, so we have kernels for each specific Intel chip, and a generic kernel for non-Intel chips"
- acqq 7y agoLuckily, from Agner's CPU blog linked above: "[Update 2019:] The newest versions of Gnu and Clang C++ compilers are now optimizing better than the Intel compiler in my tests." Good reason to avoid Intel compiler even more.
- loeg 7y agoNewest ICC is an LLVM frontend anyway. Maybe some special sauce, maybe not.
- Dylan16807 7y agoThe link in the post above is a reasonable intro: https://www.agner.org/optimize/blog/read.php?i=49 https://www.agner.org/optimize/blog/read.php?i=49
- neonate 7y agoThank you!
- unlinked_dll 7y agoStrong disagree. When writing optimized code you typically check for CPU feature before CPUID, and profile to verify that it actually is faster. In Intel's case, libraries like MKL/IPP don't decide which implementation to use based on available features but CPUID, and fall back to slow versions even if the CPU supports all features required for the optimization. There's nothing stopping Intel from providing fast libs that are optimized for their hardware, profiled on their systems, and utilize all the secret sauce they want while still being more or less "fast" on AMD. But all that said those libs aren't especially compelling when there are alternatives that may be a bit slower on Intel but kick ass on AMD, when a non-zero segment of users are transitioning to the better value processors today.
- toast0 7y ago> In Intel's case, libraries like MKL/IPP don't decide which implementation to use based on available features but CPUID, and fall back to slow versions even if the CPU supports all features required for the optimization. The CPU features indicates if a feature is available, but doesn't indicate if it's advisable or fast -- that's why Intel built a table for their hardware, and they'd need a table for AMD hardware too, except they don't care, because it's not their hardware. AMD or someone could build that table and patch it in, or try to convince Intel to include it, but expecting Intel to build it themselves is wishful thinking at best.
- endorphone 7y ago"and they'd need a table for AMD hardware too, except they don't care" They very much do care, and that is amply evident. Every other compiler uses feature detection or developer intention (e.g. if I say use AVX, use it or crash). Intel actively and intentionally -- with intent -- sabotages performance on AMD devices. This is where the market decides, however, and it's why the intel compilers and libraries are fringe products, and their software division is effectively a disaster. If you have a specific HPC setup with Intel processors maybe you'll cross compile with them, but most simply steer far clear of them. For a while Intel sold them as a software vendor -- not as some sort of coupled processor support -- and many learned they aren't trustworthy.
- zrm 7y agoYou're looking at this from the perspective of someone who is actually using this specific library. The issue is that it's cheating on a benchmark. The large majority of the code people actually run isn't written by Intel or AMD. We use benchmarks for comparison because it gives people an idea of the relative performance of the hardware. Reviewers are not going to test the hardware against every individual piece of line-of-business software or in-house custom code that people will run on the hardware in real life, so instead you get a sample of some common categories of computer code. Optimizing the benchmark for one architecture and not the other is cheating because it makes it no longer a representative sample. Real third party code is generally not going to enable instructions only for Intel and not AMD when they exist (and improve performance) on both, it will either use them on both or not at all.
- simion314 7y agoSo you want that all binaries are packaged in 2 formats, one for AMD and one for Intel, basically all binaries will be double in size? Imagine Google code would detect if you run on Chrome and use native functions but for other browsers(including Chromium forks) will just load polyfils because checking if the feature exists is too much to ask.
- ksec 7y ago>o... combined with AMD culture of not investing in software, nothing will happen. That is just not true, they work on the open source toolchain like LLVM and GCC and hopefully things will catch up. And as far as I can tell things are getting much better in 2019.
- sliken 7y agoSee my other post on this thread. There's a Zen2/Rome/Ryzen 3xxx optimized compiler, lapback/blas, libm (math), random number generations, and others available.