# Kernel

- **Canonical URL:** https://getaimath.com/dictionary/kernel/
- **Topics:** [AI Infrastructure & Runtime](https://getaimath.com/dictionary/category/ai-infrastructure-and-runtime/)
- **Last updated:** 2026-11-25

## 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.

![AI Runtime Engines: Sharing the Oven So Nobody Waits in Line — Simple cartoon showing 4 users ordering at a coffee counter: instead of making everyone wait behind one huge order, a smart Runtime Engine serves all 4 side-by-side at the same time.](https://getaimath.com/diagrams/ai-infrastructure-and-runtime.png)
*Napkin Diagram (AI Infrastructure & Runtime): A runtime engine is the traffic controller that lets one AI chip serve dozens of people at once without anyone getting stuck.*

## What is an example of Kernel?

FlashAttention is a famous fast kernel for computing attention.

## Why does Kernel matter?

Much AI speed improvement comes from writing better kernels.

## Related Concepts

- [Quantization Backend](https://getaimath.com/dictionary/quantization-backend/): A quantization backend is the software that implements a particular quantization format and runs quantized models.
- [CUDA Kernel](https://getaimath.com/dictionary/cuda-kernel/): A CUDA kernel is a GPU program written with NVIDIA's CUDA that runs in parallel across thousands of GPU threads.
- [Latency](https://getaimath.com/dictionary/latency/): Latency is the delay between asking for something and getting a response.
- [Metal](https://getaimath.com/dictionary/metal/): Metal is Apple's graphics and computing platform that lets software use the GPU on Macs, iPhones and iPads.
- [Throughput](https://getaimath.com/dictionary/throughput/): Throughput is the total amount of work a system completes over time, like the number of tokens or requests per second across all users.
- [Vulkan](https://getaimath.com/dictionary/vulkan/): Vulkan is a cross-platform graphics and compute standard that works on GPUs from many companies.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/kernel/)
