Kernel
What is Kernel?
In one sentence: In AI computing, a kernel is a small, highly optimized program that runs one operation on a GPU or other accelerator.
Model operations like matrix multiplication or attention are each done by kernels. Faster kernels make the whole model faster. Note: this is different from an operating system kernel.
What does Kernel look like?
FlashAttention is a famous fast kernel for computing attention.
Why does Kernel matter?
Much AI speed improvement comes from writing better kernels.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/kernel/">Kernel, explained simply</a> (The AI Math Dictionary)