News for hackers. Stuff that matters.
Re:Intel's “cripple AMD” function (2019) by Jonnax on Friday August 28, 2020 @05:03PM (#24309911)
Is there major software that uses I tell compiler?
Re:Intel's “cripple AMD” function (2019) by jarvist on Friday August 28, 2020 @05:18PM (#24310076)
Most high performance software on super computers uses the Intel C and Fortran compilers, and much engineering and scientific software on workstations uses the Intel Maths Kernel Library (MKL) for high performance linear algebra.

Now that AMD EPYC processors are powering a lot of next generation super-computer clusters, we're going to have to figure out some workarounds!

Re:Intel's “cripple AMD” function (2019) by ramoz on Friday August 28, 2020 @06:50PM (#24311237)
I just compiled tensorflow on amd epyc and had no idea https://github.com/oneapi-src/oneDNN was actually MKL... now Im wondering if I even am getting all that power
Re:Intel's “cripple AMD” function (2019) by jcranmer on Friday August 28, 2020 @08:25PM (#24312038)
The actual cpuid checking code is drilled from here: https://github.com/oneapi-src/oneDNN/blob/master/src/cpu/x64...

to here: https://github.com/oneapi-src/oneDNN/blob/master/src/cpu/x64...

It's using feature-flag checks, not family checks, so you shouldn't be affected if you're using oneDNN.

Re:Intel's “cripple AMD” function (2019) by ramoz on Friday August 28, 2020 @10:49PM (#24312936)
thank you!
Re:Intel's “cripple AMD” function (2019) by freedomben on Friday August 28, 2020 @06:02PM (#24310624)
I took a reversing course some years ago and during the first part we learned how to identify the compiler using common patterns. Long story short, the Intel compiler did a phenomenally amazing job optimizing. This was 10 years ago so things may be different now.
Re:Intel's “cripple AMD” function (2019) by mhh__ on Friday August 28, 2020 @10:32PM (#24312852)
10 years ago LLVM was a baby and GCC was still on version 4. Intel probably have an advantage in areas where people pay them for it but GCC and LLVM are excellent compilers today.

Anecdotally, (ignoring that I'm still not sure whether to trust it or not) Intel stopped developing IACA and suggested (but not recommended) LLVM's MCA - which does suggest a changing of the guard in some way.

Re:Intel's “cripple AMD” function (2019) by ip26 on Friday August 28, 2020 @05:23PM (#24310128)
I think this: https://developer.amd.com/amd-aocl/amd-math-library-libm/ is supposed to be the alternative to MKL for those applications.
Re:Intel's “cripple AMD” function (2019) by dr_zoidberg on Friday August 28, 2020 @06:53PM (#24311268)
No need to develop and alternative when you can trick MKL into not crippling AMD: https://www.pugetsystems.com/labs/hpc/How-To-Use-MKL-with-AM...

Edit: the link I posted follows Agner's advice from the bottom of OPs link. However I think the extra information that it adds is that Zen2 Threadrippers outpaced then-current Intel's top contender. Once Zen3 and Intel's 11th Gen become available, repeating this benchmarks would be very valuable.

Re:Intel's “cripple AMD” function (2019) by jarvist on Friday August 28, 2020 @05:39PM (#24310299)
Thank you! I wasn't aware of this. But this is only a replacement for libm (i.e. basic trig, exp function), not the matrix-orientated BLAS, LAPACK and SCALAPACK routines that scientific codes spend >90% of their time.
Re:Intel's “cripple AMD” function (2019) by ip26 on Friday August 28, 2020 @06:25PM (#24310936)
I'm not personally familiar with those, but seems like BLAS, SCALAPACK, & others are also available:

https://developer.amd.com/amd-aocl/

Re:Intel's “cripple AMD” function (2019) by satya71 on Friday August 28, 2020 @05:15PM (#24310041)
I think you meant Intel Compiler? Yes. Intel Compiler consistently produces the highest performing binaries on Intel processors, often by a big margin. Intel MKL used to be the highest performing math library, and may still be so. As a result, most performance critical software, such as scientific applications, are compiled using ICC.
Re:Intel's “cripple AMD” function (2019) by jedbrown on Friday August 28, 2020 @05:55PM (#24310511)
This is an overstatement. ICC consistently compiles the slowest and produces the largest binaries. It also defaults to something close to -ffast-math, which may or may not be appropriate. If your app benefits from aggressive inlining and vectorization at the expense of potentially huge increases in code size, ICC is likely to do well for you. However, I've seen lots of cases where well-vectorized code is faster with GCC or Clang, including some very important cases using Intel intrinsics. (Several such cases reported to/acknowledged by Intel; some have been fixed over the years, but these observations are not uncommon.)

BLIS is used by AMD and is a good open alternative to MKL (for BLAS) across many platforms. https://github.com/flame/blis/blob/master/docs/Performance.m...

Re:Intel's “cripple AMD” function (2019) by outworlder on Friday August 28, 2020 @06:59PM (#24311344)
I have been hearing about the superiority of Intel's compiler for a couple of decades now. Back when GCC was a tiny baby compared to what it is now, and when Clang/LLVM didn't even exist.

I wonder if this Intel compiler 'superiority' is still the case today, or if this is just a meme at this point.

Re:Intel's “cripple AMD” function (2019) by jarvist on Friday August 28, 2020 @07:18PM (#24311524)
For matrix manipulation based Fortran scientific codes, ifort/MKL can give +30% compared to gfortran. It's difficult to disentangle where the speedup comes from, but certainly as jedbrown aludes to, the Intel compilers seem to make a better go of poorly optimised / badly written code.

For C based software, its a much closer run thing, and often sticking with GCC avoids weird segfaults when mixing Intel and GCC-compiled Linux libraries.

Re:Intel's “cripple AMD” function (2019) by gnufx on Saturday August 29, 2020 @07:01PM (#24320033)
> This is an overstatement.

To be generous...

Where do you typically see lack of inlining and vectorization with GCC? I'm curious because most times people have said GCC wouldn't vectorize code that I've been able to try, it would, at least if allowed -ffast-math a la Intel (as in BLIS now).

Re:Intel's “cripple AMD” function (2019) by kzrdude on Friday August 28, 2020 @08:36PM (#24312126)
Can you explain "BLIS is used by AMD"? In what way do they use it?
Re:Intel's “cripple AMD” function (2019) by jedbrown on Saturday August 29, 2020 @09:23AM (#24315890)
It's their official BLAS [1] since 2015 when they moved away from their proprietary ACML implementation [2].

[1]https://developer.amd.com/amd-aocl/blas-library/

[2] https://developer.amd.com/open-source-strikes-again-accelera...

Re:Intel's “cripple AMD” function (2019) by gnufx on Saturday August 29, 2020 @07:11PM (#24320067)
Amusingly, OpenBLAS significantly beat the bought-in ACML, on DGEMM, over the six(?) generations of Opteron I had available. AMD learnt.
Re:Intel's “cripple AMD” function (2019) by nzmlPA on Saturday August 29, 2020 @03:52AM (#24314476)
The fact that MKL is the highest performing library has nothing to do with the quality of icc's output.

It is a myth that icc produces faster binaries that may have been true 25 years ago.

Re:Intel's “cripple AMD” function (2019) by shmerl on Friday August 28, 2020 @05:26PM (#24310162)
So what are they compiled with for non Intel processors?
Re:Intel's “cripple AMD” function (2019) by petschge on Friday August 28, 2020 @05:47PM (#24310397)
The HPC codes I worked on we would compile with gcc, clang, icc and whatever vendor compiler was installed (Cray, PGI, something even worse). Then we'd benchmark the resulting binaries and make a recommendation based on speed. (Assuming the compiled binaries gave the correct results, which would sometimes fail and trigger further debugging to find out if we had undefined behaviors (or implementation defined) or had managed to find a compiler bug. For codes that are memory-bandwidth dominated the results are pretty much a toss-up. For compute bound codes intel would often win.

You can do the same when your machine has non-intel CPUs that are supported by a lot of compilers. If you are on power9 or arm the compiler list gets shorter. And a lot of supercomputers start to contain accelerators (often, but not always Nvidia GPUs) in which case there is often only one supported compiler and you have to rewrite code until that compiler is happy and produces fast code.

Re:Intel's “cripple AMD” function (2019) by Kednicma on Friday August 28, 2020 @05:16PM (#24310050)
It's a depressingly common choice for educational installations. Folks are trained to use ICC instead of GCC and then they keep using ICC when they leave school.
Re:Intel's “cripple AMD” function (2019) by Lammy on Friday August 28, 2020 @05:06PM (#24309936)
Unsure, but I think that's the implication of this bit in the OP:

"The same effect was documented with some of the most popular mathematical software packages, including Mathematica, Mathcad, and Matlab."

Re:Intel's “cripple AMD” function (2019) by the_svd_doctor on Friday August 28, 2020 @06:01PM (#24310601)
A lot of scientific/HPC code running on supercomputers is compiled with icc.