Live data from Hacker News

Linus Torvalds on AVX512

phoronix.com

81–90 of 124 posts

Re: Linus Torvalds on AVX512

#81

Earlier quoted context omitted.

AMD is doing well in the CPU market today _because_ they reversed course from the Bulldozer-based architectures.

More than that, Bulldozer didn't even have good single thread integer performance. What it gave you was 8 cores that might be able to keep up with 4 of Intel's cores on something that has 8 threads. The market was not particularly interested in this, especially since at the time even fewer things could actually use 8 threads than they do now.

Bulldozer significantly outperformed Sandy Bridge on the workloads which it was designed to be good at, which is multi-threaded integer workloads, like compiling the Linux kernel.

https://www.phoronix.com/scan.php?page=article&item=amd_fx81...

https://www.phoronix.com/scan.php?page=article&item=amd_fx83...

If Linus' attitude of "I'd rather have more cores" and "FP doesn't really matter" were representative of market demand, you'd have expected Bulldozer to do well at least somewhere, as opposed to nowhere.

Re: Linus Torvalds on AVX512

#82
post #77

What are the forces in chip design that are at play here? Over the last 10-15 years, fabs have continued to fit more and more logic gates per unit area, but haven't reduced the power consumption per gate as much. As a result, if you fill your modern chip with compute gates, you cannot use them all at once because the chip will melt. Or at least you can't have them all running at max clock rates. One solution is to in…

>but haven't reduced the power consumption per gate as much. That is simply not true. You can run the 64 Core on EPYC 2 all at once at 3Ghz all with Air Cooling. At every node they have reduced power consumption that is also one reason you see continuous performance improvement.

> That is simply not true.

I'm not claiming anything controversial. Power not having scaled as well as area recently is often referred to as the end of Dennard scaling:

https://en.wikipedia.org/wiki/Dennard_scaling#Breakdown_of_D...

> You can run the 64 Core on EPYC 2 all at once at 3Ghz all with Air Cooling.

That can be true despite the fact that power hasn't scaled as well as area.

> At every node they have reduced power consumption

Yep, just not as much as they improved area.

Re: Linus Torvalds on AVX512

#83

Earlier quoted context omitted.

More than that, Bulldozer didn't even have good single thread integer performance. What it gave you was 8 cores that might be able to keep up with 4 of Intel's cores on something that has 8 threads. The market was not particularly interested in this, especially since at the time even fewer things could actually use 8 threads than they do now.

Bulldozer significantly outperformed Sandy Bridge on the workloads which it was designed to be good at, which is multi-threaded integer workloads, like compiling the Linux kernel. https://www.phoronix.com/scan.php?page=article&item=amd_fx81... https://www.phoronix.com/scan.php?page=article&item=amd_fx83... If Linus' attitude of "I'd rather have more cores" and "FP doesn't really matter" were representative of market…

Are we looking at the same benchmarks? In the first they're comparing an 8-core Bulldozer to Sandy Bridge with 4 cores and no hyperthreading and it's basically even, sometimes it wins by a small margin on the threaded ones. In the second the 3770K has 4 cores with hyperthreading and that makes it look even worse.

If they were actually getting twice the integer performance per module as Intel was getting per core then it might've been interesting, but being the same or only slightly better when comparing modules to cores wasn't enough to overcome the single thread performance deficit which people still care about a lot.

Re: Linus Torvalds on AVX512

#84
post #67

The AVX512 instructions can cause strange global performance downgrades. “One challenge with AVX-512 is that it can actually _slow down_ your code. It's so power hungry that if you're using it on more than one core it almost immediately incurs significant throttling. Now, if everything you're doing is 512 bits at a time, you're still winning. But if you're interleaving scalar and vector arithmetic, the drop in clock…

> The AVX512 instructions can cause strange global performance downgrades. Can other SIMD instructions (AVX2, say) do the same?

AVX was slowing down some code if input was less than 128 bits wide.

Re: Linus Torvalds on AVX512

#85

Earlier quoted context omitted.

He has the history correct. Most of the CPUs that x86 beat in the market had superior FP performance; SPARCs, Alphas, PA-RISC, Itanium, etc. This isn't a discussion about history, it's a discussion about SIMD FP instruction sets. Maybe we should all be astronomers and thermodynamicists writing bespoke finite element simulations and have a deep appreciation for the wonders of floating point ISAs, but that's just not t…

Fixed point audio decoding is common, actually. In general, floating point math makes sense when dealing with computations in a range spanning different orders of magnitude, where one cares about relative precision. This describes a lot of what we use computers for, but fixed point math is a lot more efficient and makes sense for simpler cases.

No, it isn't common. Source: someone who actually does this stuff.

Audio processing and decoding is all about maintaining intermediate results at appropriate precision. The magnitudes involved far exceed the bit width at the output of the pipeline. The only reason you would ever use fixed point is for speed... which is no longer necessary, and needs to stay that way.

Re: Linus Torvalds on AVX512

#86
post #78

Earlier quoted context omitted.

He has the history correct. Most of the CPUs that x86 beat in the market had superior FP performance; SPARCs, Alphas, PA-RISC, Itanium, etc. This isn't a discussion about history, it's a discussion about SIMD FP instruction sets. Maybe we should all be astronomers and thermodynamicists writing bespoke finite element simulations and have a deep appreciation for the wonders of floating point ISAs, but that's just not t…

What he said and I quote; >AVX2 is much more than enough.

Funny, that's not the same as the quote I responded to. Something about nobody caring about improving FP performance outside of benchmarks.

Which of us is quoting Linus accurately? It can't be both of us, unless Linus is slipping into his dotage.

Also:

"640K is enough for anyone."

"Who needs MMX? Just give me more superscalar execution units."

"Who needs 3DNow? Nobody uses floats. Integer SIMD is fine."

"Who needs SSE? Nobody's even using 3DNow yet."

"Who needs SSE2? Only astronomers need double precision."

"Who needs SSE3? I don't even know how to use SSE2 yet."

"Who needs SSE4? I don't write codecs."

"Who needs AVX...?"

When has this line of reasoning ever proven correct in the long run?

Re: Linus Torvalds on AVX512

#87
post #18

Earlier quoted context omitted.

The main problem is software, with GPGPUs you need to explicitly program for them, while with stuff like AVX there is this implicit hope that you just code as always and the compiler will take care of the rest via auto-vectorization and PhD level optimization algorithms. Because outside artificial intelligence, graphics and audio, there is little else that common applications would use the GPGPU for, so the large maj…

> while with stuff like AVX there is this implicit hope that you just code as always and the compiler will take care of the rest via auto-vectorization and PhD level optimization algorithms No. I recently could really, really have used the packed saturated integer arithmetic and horizontal addition in AVX2 (but my old machine doesn't support it) and even better, the same but 512 bits wide on AVX512. It would only hav…

I am looking at it of the point of view of joe/jane developer that cannot tell head from tail regarding vector programming and doesn't even know what compiler intrinsics are for, and use languages that don't expose them anyway.

Re: Linus Torvalds on AVX512

#88
post #67

The AVX512 instructions can cause strange global performance downgrades. “One challenge with AVX-512 is that it can actually _slow down_ your code. It's so power hungry that if you're using it on more than one core it almost immediately incurs significant throttling. Now, if everything you're doing is 512 bits at a time, you're still winning. But if you're interleaving scalar and vector arithmetic, the drop in clock…

> The AVX512 instructions can cause strange global performance downgrades. Can other SIMD instructions (AVX2, say) do the same?

> Can other SIMD instructions (AVX2, say) do the same?

On Intel CPUs, yes. There's even a BIOS/UEFI setting to specify how much you want the clock frequency to drop when running AVX code called "AVX offset". AMD CPUs doesn't do that though as far as I know.

The thermal hit of using wider vectors decreases with every node shrink though, so expect the issue to become muted over time (which also explains why that doesn't apply to AMD - their only µarch with 256-bit execution units, Zen 2, is on a better node than Intel).

Re: Linus Torvalds on AVX512

#89

FP matters (especially with SIMD) It matters to image/video/audio processing It matters to simulations It matters to 3D models/rendering It matters to games So it's not "just benchmarks", people actually want to do stuff with it Sure, AVX512 might not be the greatest way of doing it, and it might be better to just make the existing instructions go faster, that might work

> So it's not "just benchmarks", people actually want to do stuff with it

IIRC when bulldozer was released and Intel's propaganda machine started spewing stories about how AMD core count was fake because two cores shared a FP unit, there was a flurry of scientific papers on the subject.

IIRC, it was determined that even the hot path of FP-intensive code only executed a single FP ops for each 7 non-FP operations. To put it differently, between each FP op all code has to execute ops to move data around.

Consequently, bulldozer's FP benchmarks scaled linearly wrt cores because even when multiple cores had to share a FP unit to run FP operations, they were so relatively scarce even in number-crunching applications that cores didn't blocked, thus overall performance was not affected.

That's the relevance of FP in real-world benchmarks.

Re: Linus Torvalds on AVX512

#90
post #49

Earlier quoted context omitted.

He has the history correct. Most of the CPUs that x86 beat in the market had superior FP performance; SPARCs, Alphas, PA-RISC, Itanium, etc. > When's the last time he actually did anything with a computer? According to Linus he completes about 30 pull requests a day. Some multiple of that in kernel builds. His $1900 32 core Threadripper speeds that process a great deal and FP contributes little to nothing. Today peop…

Speaking as someone who does scientific computing all day long, in part with FEM simulations, even for me AVX512 isn't usually worth it in terms of wall-clock time.

Yes, it's pretty much useless, and Linus's reasoning will guarantee that things stay that way.
Post reply on HN