AI Infra Interviews logo
How work runs · free reference

Kernel

A GPU kernel is a function launched to execute work on the device. In CUDA SIMT, many threads execute that function with different indices.

GPU kernel

How it works

The host specifies the grid, block dimensions and stream. Submission is often asynchronous: returning from a launch does not establish that the GPU finished. Dependencies or explicit completion checks govern when the host or another operation can use results.

Work through an example

A vector-add kernel may assign one output element to each thread. A matrix-multiply kernel usually assigns a tile of output to a cooperating block, reusing input data across many operations.

Where the term can mislead

A machine-learning operator is not necessarily one kernel. A framework may split it into several launches or fuse it with neighboring operators.

Connect the idea

Take it into practice

Continue with the existing concept, apply it to an interview problem, or follow a course lesson. Access requirements are shown before you open a page.

New to GPUs? Start with the free execution-model concept.

Sources and scope

Examples here are teaching calculations, not measured GPU performance. Consult the linked documentation for the exact device, instruction and tool version. Source review: 25 October 2026.

  1. NVIDIA CUDA Programming Guide: programming model ↗
  2. NVIDIA CUDA Programming Guide: asynchronous execution ↗