CS 6120: Loop-Level Automatic Vectorization
Introduction Modern processors have support for SIMD instructions, which allow for efficient vector operations. We can leverage this feature to optimize loops that operate iteratively on arrays by changing operations that act on single array elements into vector operations that act on multiple array values in one instruction. Consider the following loop of a vector-vector add:
Loop-Level Automatic Vectorization by Katy Voor , Henry Liu October 23, 2019 Introduction Modern processors have support for SIMD instructions, which allow for efficient vector operations. We can leverage this feature to optimize loops that operate iteratively on arrays by changing operations that act on single array elements into vector operations that act on multiple array values in one instruction. Consider the following loop of a vector-vector add: # Assume a, b, and c represent array base addresses in memory such # that the arrays do not overlap. ... one: int = const 1; vvadd_loop: ai: in
related reading
- How to Optimize a CUDA Matmul Kernel for cuBLAS-like Performance: a Worklogsiboehm.com
- LLVM is Smarter Than Meblog.sulami.xyz
- Implementing a GPU's Programming Model on a CPUlitherum.blogspot.com
- CS 6120: The Self-Guided Coursecs.cornell.edu
- A Tiny Compiler for Data-Parallel Kernelshealeycodes.com
- Designing a SIMD Algorithm from Scratch · mcyoungmcyoung.xyz
- Inside NVIDIA GPUs: Anatomy of high performance matmul kernels - Aleksa Gordićaleksagordic.com
- abseil / Performance Hintsabseil.io
- What happens when you run a CUDA kernelfergusfinn.com
- Looped Transformers as Programmable Computersarxiv.org
- SIMD with Zigopenmymind.net
- Devlog ⚡ Zig Programming Languageziglang.org