Home Knowledge Base GPU Compute Shaders

GPU Compute Shaders are the programmable pipeline stages that execute general-purpose parallel computations on GPU hardware outside the traditional graphics rendering pipeline — enabling thousands of threads to process data in parallel using the GPU's massive SIMD architecture for workloads ranging from physics simulation and image processing to machine learning inference and cryptographic operations.

From Graphics to General Compute

GPUs were originally fixed-function graphics pipelines. The introduction of programmable shaders (vertex, fragment) revealed that the underlying hardware — thousands of ALUs with high-bandwidth memory — was a powerful general-purpose parallel processor. Compute shaders (introduced in OpenGL 4.3, DirectX 11, Vulkan 1.0) formalized this by providing a non-graphics entry point to GPU hardware.

Execution Model

Memory Hierarchy

LevelSizeLatencyScope
Registers~256 KB/CU1 cyclePer-thread
Shared Memory (LDS/SMEM)32-128 KB/CU~20 cyclesPer-workgroup
L1 Cache16-128 KB/CU~30 cyclesPer-CU
L2 Cache4-96 MB~200 cyclesGlobal
VRAM (HBM/GDDR)16-192 GB~400 cyclesGlobal

Compute Shader Use Cases

Performance Optimization

GPU Compute Shaders are the interface between the programmer's parallel algorithm and the GPU's massively parallel hardware — providing the abstraction that makes thousands of ALUs accessible for general-purpose computation without requiring knowledge of the underlying hardware microarchitecture.

gpu compute shadercompute pipeline gpugeneral purpose gpugpgpu programmingdispatch compute workgroup

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.