By: Jörn Engel (joern.delete@this.purestorage.com), May 17, 2022 10:24 am
Room: Moderated Discussions
Charlie Burnes (charlie.burnes.delete@this.no-spam.com) on May 17, 2022 3:31 am wrote:
> > AVX512 may not have much of a future unless Intel, AMD or both change their behavior a bit.
>
> Do you mean offer AVX512 on consumer CPUs?
In the end, CPUs without AVX512 should die out. If that doesn't happen, AVX512 will continue to be a pain. Any new CPU produced today supports SSE4.2. Most (not sure if all) support AVX2. So we can largely drop support for anything older. How confident are you that we will say the same thing about AVX512 within a decade?
> What is your opinion of using GCC vector extensions to create code that works on both
> CPUs with and without AVX512?
I like the vector extensions. Though mostly because you can write more readable code.
some_vector += other_vector;
some_vector = _mm256_add_epi64(some_vector, other_vector);
You are right that you can reuse the first line for different vector lengths. You can also reuse it for different element types. It reads a lot more like textbook C code. There is probably a reason we use the C syntax in dozens of languages, while I don't know a second example of something like Intel intrinsics.
> > AVX512 may not have much of a future unless Intel, AMD or both change their behavior a bit.
>
> Do you mean offer AVX512 on consumer CPUs?
In the end, CPUs without AVX512 should die out. If that doesn't happen, AVX512 will continue to be a pain. Any new CPU produced today supports SSE4.2. Most (not sure if all) support AVX2. So we can largely drop support for anything older. How confident are you that we will say the same thing about AVX512 within a decade?
> What is your opinion of using GCC vector extensions to create code that works on both
> CPUs with and without AVX512?
I like the vector extensions. Though mostly because you can write more readable code.
some_vector += other_vector;
some_vector = _mm256_add_epi64(some_vector, other_vector);
You are right that you can reuse the first line for different vector lengths. You can also reuse it for different element types. It reads a lot more like textbook C code. There is probably a reason we use the C syntax in dozens of languages, while I don't know a second example of something like Intel intrinsics.