8 ms·
AVX-512, what’s useful for us
- minxomat 9y agodocument.querySelector('#k2Container').style.color = 'black'; and the blog post becomes almost readable. Other than that, nice intro.
- kierank 9y agoYeah, sorry about that, that site's getting replaced soon.
- tambre 9y agoMight want to also think about SSL. Certificates are free from Let's Encrypt. That said, props for the IPv6 support!
- tytytytytytytyt 9y agoIt's still far better than the 2x font size sites.
- dragontamer 9y agoIt will be a while before AVX-512 becomes practical however. AMD doesn't support it (so any RyZen or Threadripper fans will miss out), and even Intel 8th Gen Coffee-lake doesn't support it. Only Intel Extreme i9 and Xeon Silver / Gold / Platinum seems to support it. So the market for this instruction set is quite limited.
- jsheard 9y agoFWIW we're only one generation away from AVX512 on consumer CPUs, Intel's upcoming Cannon Lake architecture will support it. https://www.anandtech.com/show/11928/intels-document-points-to-avx512-support-by-consumer-cannon-lake-cpus https://www.anandtech.com/show/11928/intels-document-points-...
- dragontamer 9y agoWell, one-generation away from consumers being able to buy the chip. And maybe 5-years away before a sizable number of consumers upgrade to that chip (or newer)... since the typical Desktop is at LEAST 5 years old in my experience... The Users who really need the feature are likely upgrading to AVX-512 computers already. IE: Mac Pro. So adoption is not as bad as my hyperbole above. But its still going to be a while before we can assume AVX512 support on machines. Hell, with so many people running Sandy Bridge (i7-2xxx series), you can't even assume AVX2 support today.
- tambre 9y agoCouldn't you use something like GCC function multi-versioning?
- dragontamer 9y agoAVX512 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 has major improvements, above and beyond the 256bit -> 512bit upgrade. AVX512 has 32-registers per core (when AVX2 and earlier only have 16). The new set of opmask instructions also allow for way more code to turn into "branch-free" code which is friendly for pipelines. This is already a major step forward alone with huge implications for multimedia code. * AVX512-CD: Conflict Detection. These instructions allow auto-vectorizers to "resolve loop conflicts" and auto-vectorize more code. * VL, DQ -- Extend AVX512 to Bytes, Shorts, Longs, Long Longs. * BW -- Extend AVX512 to operate on only 256-bit and 128-bits at a time. -------------------- I'm certain that some code, which could not be vectorized in AVX2 (or lower), will be vectorized with AVX512. Maybe even automatically as compiler writers implement high-level features / auto-vectorizers.
- dman 9y ago
- hugo19941994 9y agoSkylake-X Core i7 CPUs also support AVX-512 https://ark.intel.com/products/123767/Intel-Core-i7-7820X-X-series-Processor-11M-Cache-up-to-4_30-GHz https://ark.intel.com/products/123767/Intel-Core-i7-7820X-X-... That's still a pretty limited selection of processors though.
- AndrewGaspar 9y agoOnly if you're writing general purpose software. We're taking advantage of AVX-512 in HPC since the cost of re-writing the software to take advantage of the hardware is a smart investment due to the large capital costs involved.
- raphlinus 9y agoIf I'm understanding it correctly, they're not actually using the 512 bit (ZMM) registers, because using them can cause overall system slowdown. It seems to me they're only really useful if you're doing an AVX-512 intensive workload. And do those really exist? For something like bulk matrix multiplications, GPGPU is going to be much better, both in throughput and in operations per joule. I'm remaining to be convinced that the ecological niche occupied by SIMD is significant, let alone expanding.
- chrisseaton 9y ago> For something like bulk matrix multiplications, GPGPU is going to be much better, both in throughput and in operations per joule. But you have to get all of your matrix out onto the system bus, and over to the GPU, then start the kernel, and then copy it all the way back again, to use that. ZMM is just a register. You can operate on it immediately and stream data from memory while you do the multiply.
- equalunique 9y agoAMD's HSA is intended to enable memory sharing between the CPU and GPU.
- justincormack 9y agoThey 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.
- Dylan16807 9y agoWhat models don't slow down? Are you claiming the slowdown isn't actually necessary to keep the chip stable?
- justincormack 9y agocompare these https://en.wikichip.org/wiki/intel/xeon_silver/4116#Frequencies https://en.wikichip.org/wiki/intel/xeon_silver/4116#Frequenc... https://en.wikichip.org/wiki/intel/xeon_gold/6154#Frequencies https://en.wikichip.org/wiki/intel/xeon_gold/6154#Frequencie... https://en.wikichip.org/wiki/intel/xeon_platinum/8180m#Frequencies 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
- ninegunpi 9y agofor slowing down awkward code?
- pkaye 9y agoI 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 9y ago[deleted]
- mscrivo 9y agoAVX 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?
- pkaye 9y agoThat is one theory I had but i'm not sure how to determine if CPU is throttling (on Ubuntu Linux.)
- thecompilr 9y agoYou can either use lscpu, which is less accurate, or the best way is to check: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq where instead of cpu0 you can write any core number, and it will give you the current frequency of that core in KHz.
- gok 9y agoDoesn't mention what I find the coolest part of AVX-512: the conflict detection instructions. Finally a way to vectorize loops with indirect loads!