News for hackers. Stuff that matters.
Re:Transcoding Unicode with AVX-512: AMD Zen 4 vs. Intel Ice... by brrrrrm on Thursday January 05, 2023 @08:50PM (#34269913)
typically if it's available, compilers will use the avx512 register file. This means you'll see things like xmm25 and ymm25 (128 and 256 bit registers) and those are avx512 only. However, compilers using 512-wide instructions is kinda rare from what I've seen
[dead]
Re:Transcoding Unicode with AVX-512: AMD Zen 4 vs. Intel Ice... by brrrrrm on Friday January 06, 2023 @10:53AM (#34276086)
without using intrinsics? `-O3 -march=skylake-avx512 -mprefer-vector-width=512`
Re:Transcoding Unicode with AVX-512: AMD Zen 4 vs. Intel Ice... by celrod on Friday January 06, 2023 @03:19AM (#34272289)
You can use `-mprefer-vector-width=512` to use 512 bit vectors, or if you want a particular function to use 512, you could try the min-vector-width attribute: https://clang.llvm.org/docs/AttributeReference.html#min-vect...

In my experience, clang unrolls too much, so you end up spending all your time in the non-vectorized remainder. Using smaller vectors cuts the size of the non-vectorized remainders in half, so smaller vectors often give better performance for that reason. (Unrolling less could have the same effect while decreasing code size, but alas)