3 ms·
What’s a good source to learn and practice AVX?
by bluedevilzn 3y ago
What’s a good source to learn and practice AVX?
- utopcell 3y agoYou could study Google's Highway library [1]. [1] https://github.com/google/highway https://github.com/google/highway
- kierank 3y agoFFmpeg has a lot of assembly language that can be added to: https://blogs.gnome.org/rbultje/2017/07/14/writing-x86-simd-using-x86inc-asm/ https://blogs.gnome.org/rbultje/2017/07/14/writing-x86-simd-...
- Const-me 3y agoFor a starting point, I wrote that article couple years ago: http://const.me/articles/simd/simd.pdf http://const.me/articles/simd/simd.pdf I don’t recommend assembly. Intrinsics are typically good enough performance wise, and writing correct assembly is hard. For instance, Chromium has non-trivial dependencies with code written in assembly, and they caused tons of fun debugging issues like that https://bugs.chromium.org/p/chromium/issues/detail?id=1218384 https://bugs.chromium.org/p/chromium/issues/detail?id=121838... Using intrinsics would have solved that because modern compilers follow ABI conventions of the target platforms very carefully. About that highway, I don’t have any experience but based on the documentation I don’t like it too much. They say that’s a thin wrapper over intrinsics, but I believe it still breaks things. Specifically, Intel and ARM don’t document highway, but they have decent documentation on their intrinsics. Similarly, stackoverflow has thousands of questions and answers with tags like SSE and AVX, most of them are related to intrinsics, but nothing related to highway.