News for hackers. Stuff that matters.
Re:Intel Publishes Fast AVX-512 Sorting Library, 10~17x Fast... by optimalsolver on Wednesday February 15, 2023 @08:02PM (#34813486)
I still don't get why people think Intel is obligated to optimize AMD performance. From what I recall, it wasn't a case of slowing down AMD devices, they just didn't apply code optimizations to machines not using Intel.
Re:Intel Publishes Fast AVX-512 Sorting Library, 10~17x Fast... by sliken on Wednesday February 15, 2023 @08:15PM (#34813595)
The code literally checked for CPU = AMD, and ignore the CPU feature bits what show which accelerations are available.

So sure Intel shouldn't tune for AMD, but if the AVX2 is listed as available a compiler should use it. This was proven when via some shared library trickery you could lie about the CPU name, and suddenly the AMD CPU was faster.

I stumbled across this on a "Why is matlab much slower than I'd expect" thread. Lying about the CPU greatly improved performance and still showed the correct answers.

Re:Intel Publishes Fast AVX-512 Sorting Library, 10~17x Fast... by jeroenhd on Thursday February 16, 2023 @04:12AM (#34816607)
With all the errata compilers need to correct for, I wouldn't blame the compiler for not optimising for foreign chips. Matlab chose to use a library that only works well for Intel (a simple benchmark would've shown that), I don't think Intel's compiler team should be forced to write code for AMD chips. I very much doubt AMD's driver team will optimise their OpenCL tools for Nvidia hardware either.

Blame Matlab and friends for slowing down their software on your computer.

Re:Intel Publishes Fast AVX-512 Sorting Library, 10~17x Fast... by stephencanon on Thursday February 16, 2023 @10:45AM (#34820160)
If Matlab performance is important for competitive reasons, AMD should hire a few SW engineers to build tuned linear-algebra libraries like Intel does. It’s not rocket science. They could be competitive or faster with a low-millions-per-year investment (and only slightly behind with a much smaller investment in grad students and open source).

I worked on these sorts of libraries (not at Intel) for a decade, it’s very, very common to dispatch on CPU family rather than feature flags, because performance details are tied to the microarchitecture, not availability of the feature. Even though Skylake and Haswell both support AVX2 and FMA, there are huge differences in implementation that effect what the best implementation will be, so you can’t just say “oh, FMA is available, use version 37.” Instead you do “if we’re on Skylake, use the Skylake version, if we’re on Haswell, use the Haswell version, otherwise fall back on the generic runs-anywhere version.” Nothing underhanded about it.

Re:Intel Publishes Fast AVX-512 Sorting Library, 10~17x Fast... by Dylan16807 on Wednesday February 15, 2023 @09:02PM (#34813989)
> it wasn't a case of slowing down AMD devices, they just didn't apply code optimizations to machines not using Intel

What's the difference?

The thing that would be okay is "not having optimizations designed for AMD devices".

But when you already have the optimizations, and you refuse to use them because AMD, that is not okay.

Re:Intel Publishes Fast AVX-512 Sorting Library, 10~17x Fast... by rf15 on Thursday February 16, 2023 @12:56AM (#34815585)
> What's the difference

Let's be naïve: "not doing something" is indeed, on a literal level, different from "doing something to slow it down". It's a bit like the nuances of a lie by omission vs a proper lie. That being said... both are still considered lies in a more abstract sense, and so is this deliberate slowdown. I assume the author just took it all a little more literal than most people (probably?) deem necessary.

Re:Intel Publishes Fast AVX-512 Sorting Library, 10~17x Fast... by Dylan16807 on Thursday February 16, 2023 @03:45AM (#34816475)
I would say "not doing something" is an incorrect description of what it did, though. They had to write extra code to make the behavior on Intel and AMD differ.