Anatomy of a Compute Kernel
The hot inner loop that does the work.
What Is a Kernel?
A compute kernel is the small, focused routine that does the real numerical work, like adding two arrays element by element.
The Hot Inner Loop
Most of a kernel's time lives in one tight inner loop. Speed up that loop and you speed up the whole program.
for i in range(n):
out[i] = a[i] + b[i]All lessons in this course
- Anatomy of a Compute Kernel
- Combining SIMD with Loops
- Reducing Memory Traffic
- Tiling for Cache Locality