Live data from Hacker News

AVX-512, what’s useful for us

obe.tv

21–30 of 50 posts

Re: AVX-512, what’s useful for us

#21
I changed some Golang code to AVX in my last project. In isolation that code ran like 2-4x faster but as part of the full program, the program was 5% slower overall. Could never make a sense of it. Any thoughts on how to determine the cause?

Re: AVX-512, what’s useful for us

#22
post #21

I changed some Golang code to AVX in my last project. In isolation that code ran like 2-4x faster but as part of the full program, the program was 5% slower overall. Could never make a sense of it. Any thoughts on how to determine the cause?

[deleted]

Re: AVX-512, what’s useful for us

#23
post #21

I changed some Golang code to AVX in my last project. In isolation that code ran like 2-4x faster but as part of the full program, the program was 5% slower overall. Could never make a sense of it. Any thoughts on how to determine the cause?

AVX code is known to make the CPU run way hotter than usual. Perhaps that caused throttling that made general code running at the same time, or within a short span thereafter, perform worse?

Re: AVX-512, what’s useful for us

#24
post #21

I changed some Golang code to AVX in my last project. In isolation that code ran like 2-4x faster but as part of the full program, the program was 5% slower overall. Could never make a sense of it. Any thoughts on how to determine the cause?

Did you remember to put a vzeroupper instruction at the end of your AVX functions? If not then you pay a performance penalty when transitioning from AVX to SSE code, and the rest of your program might be inadvertently touching SSE code hidden inside the Go runtime.

Re: AVX-512, what’s useful for us

#25
post #23
post #21

I changed some Golang code to AVX in my last project. In isolation that code ran like 2-4x faster but as part of the full program, the program was 5% slower overall. Could never make a sense of it. Any thoughts on how to determine the cause?

AVX code is known to make the CPU run way hotter than usual. Perhaps that caused throttling that made general code running at the same time, or within a short span thereafter, perform worse?

That is one theory I had but i'm not sure how to determine if CPU is throttling (on Ubuntu Linux.)

Re: AVX-512, what’s useful for us

#26
post #24
post #21

I changed some Golang code to AVX in my last project. In isolation that code ran like 2-4x faster but as part of the full program, the program was 5% slower overall. Could never make a sense of it. Any thoughts on how to determine the cause?

Did you remember to put a vzeroupper instruction at the end of your AVX functions? If not then you pay a performance penalty when transitioning from AVX to SSE code, and the rest of your program might be inadvertently touching SSE code hidden inside the Go runtime.

Yes I already do that.

Re: AVX-512, what’s useful for us

#27
post #3
post #2

document.querySelector('#k2Container').style.color = 'black'; and the blog post becomes almost readable. Other than that, nice intro.

Yeah, sorry about that, that site's getting replaced soon.

It's still far better than the 2x font size sites.

Re: AVX-512, what’s useful for us

#28

Earlier quoted context omitted.

They only cause slowdown on some models, if you pay Intel enough they wont. The advantage of AVX512 is you can use it on every core (rather than trying to work out how to partition a GPU), and it is useful for lots of general purpose computations.

What models don't slow down? Are you claiming the slowdown isn't actually necessary to keep the chip stable?

compare these

https://en.wikichip.org/wiki/intel/xeon_silver/4116#Frequenc...

https://en.wikichip.org/wiki/intel/xeon_gold/6154#Frequencie...

https://en.wikichip.org/wiki/intel/xeon_platinum/8180m#Frequ...

So platinum can run avx512 on 28 cores at 2.3GHz, while silver runs 12 cores at 1.4GHz

Re: AVX-512, what’s useful for us

#29
post #9

Earlier quoted context omitted.

Couldn't you use something like GCC function multi-versioning?

AVX512 has so many more features above-and-beyond Intel's typical SIMD implementation. Feature wise, its beginning to be competitive against NVidia's PTX CUDA architecture. Like, AVX512 is a really, really good instruction set (or I guess: a really good set of instruction sets). Assuming AVX512 F, CD, VL, DQ, and BW (the expected AVX512 instructions in CannonLake): * AVX512F -- "Standard" 512-bit arithmetic already h…

Intel did a self goal here by limiting availability of AVX512 to select Xeon SKUs.

Re: AVX-512, what’s useful for us

#30

Earlier quoted context omitted.

They only cause slowdown on some models, if you pay Intel enough they wont. The advantage of AVX512 is you can use it on every core (rather than trying to work out how to partition a GPU), and it is useful for lots of general purpose computations.

What models don't slow down? Are you claiming the slowdown isn't actually necessary to keep the chip stable?

Xeon Phi, maybe? Since the entire raison d'être of that chip is doing avx-512 computation. Or if you're a glass half empty kind of person, you'd argue that it doesn't speed up when running scalar code. :)
Post reply on HN