Skip to main content
  1. Posts/

Unlocking Parallel Power: The GPGPU Revolution

8 mins· ·
GPGPU CUDA OpenCL Parallel Computing Programmable Shaders Unified Architecture GeForce NVIDIA Tesla Architecture SIMT High-Performance Computing Vertex Shader Pixel Shader Scientific Computing AI Hardware Heterogeneous Computing Streaming Multiprocessor Shader Model GPU Programming Compute Kernel
Author
Mike Watson
A little bit about Mikey W
Table of Contents
The Evolution of the GPU: From Pixels to Petascale AI - This article is part of a series.
Part 2: This Article

While GPUs were initially conceived for graphics, their underlying parallel architecture held immense potential for other computationally intensive tasks. The journey from fixed-function graphics pipelines to programmable, general-purpose compute engines marked a pivotal shift, unlocking the power of GPUs for science, engineering, and eventually, artificial intelligence.

Beyond Graphics: The Shift to General-Purpose Computation
#

The critical enabler for using GPUs beyond graphics was the introduction of programmability into the graphics pipeline.10 Early GPUs operated with fixed-function pipelines, where the stages and operations were hardwired. Around the turn of the millennium, driven by the desire for more sophisticated and customizable visual effects in games, programmability began to emerge. Microsoft’s DirectX 8.0 (November 2000) and corresponding OpenGL extensions introduced programmable vertex shaders and pixel (or fragment) shaders. Vertex shaders allowed developers to write small programs to manipulate the attributes (position, color, texture coordinates) of each vertex in a 3D model, while pixel shaders allowed custom programs to determine the final color of each pixel being rendered.23 The NVIDIA GeForce 3 (NV20), released in 2001, is widely recognized as the first consumer GPU featuring programmable pixel shaders.43 This programmability freed graphics artists and developers from the constraints of predefined effects, enabling a new level of visual realism and creativity.

This newfound programmability, combined with the GPU’s rapidly increasing floating-point performance (driven by the demands of the gaming market), did not go unnoticed by the scientific and research communities.7 They realized that the GPU’s architecture—designed for massively parallel operations on pixels and vertices—was fundamentally well-suited for many scientific computations that also involved performing similar operations on large grids or datasets.47 This led to the emergence of General-Purpose computing on GPUs (GPGPU) around 2001-2002.

Early GPGPU efforts were often described as “hacking” or “tricking” the graphics pipeline.46 Researchers had to reformulate their computational problems in terms of graphics concepts.47 Data arrays were mapped onto textures, computational kernels were written as pixel or vertex shaders, and the results were read back from the framebuffer or texture memory.47 Despite the complexity, this approach yielded significant speedups (often 10-100x over CPUs) for various applications, including linear algebra (like matrix multiplication), physics simulations (like fluid dynamics), signal processing, financial modeling, bioinformatics, and early ray tracing experiments.

The reason GPUs proved so effective lies in their architectural philosophy. Unlike CPUs, which dedicate significant silicon area to complex control logic and large caches to minimize the latency of individual, often sequential, tasks, GPUs prioritize computational throughput.3 They achieve this by packing the die with a vast number of simpler arithmetic logic units (ALUs) and employing massive multithreading to hide memory and instruction latencies. When one group of threads stalls waiting for data, the GPU rapidly switches to another group that is ready to execute. This makes GPUs exceptionally efficient for data-parallel problems—tasks where the same computation can be performed independently on many data elements simultaneously.

The emergence of GPGPU was largely opportunistic, a consequence of the programmability introduced for graphics purposes. The scientific community recognized and exploited the latent parallel computing power inherent in the GPU architecture. This grassroots movement demonstrated the immense potential of GPUs beyond graphics, paving the way for dedicated GPGPU platforms and architectures.

Enabling the Ecosystem: CUDA and OpenCL
#

While early GPGPU experiments demonstrated remarkable speedups, programming GPUs using graphics APIs like OpenGL and DirectX was cumbersome, inefficient, and required specialized knowledge of the graphics pipeline.47 Data had to be formatted as textures, algorithms expressed as shaders, and results read back from graphics buffers, adding significant overhead and complexity. To truly unlock the GPU’s parallel processing capabilities for a wider scientific and engineering audience, a more direct and accessible programming model was essential.

NVIDIA addressed this challenge with the introduction of CUDA (Compute Unified Device Architecture) in late 2006, with the first public SDK released in February 2007.12 Spearheaded by engineers like Ian Buck, whose prior work on the Brook stream processing language at Stanford heavily influenced its design 53, CUDA provided a parallel computing platform and programming model specifically for NVIDIA GPUs. It offered extensions to standard programming languages, most notably C and C++ (later adding support for Fortran, Python, and others), allowing developers to write “kernels”—functions to be executed in parallel on the GPU—using familiar syntax. CUDA abstracted some of the low-level hardware details while exposing the GPU’s parallelism through a hierarchical model of threads, thread blocks, and grids, along with mechanisms for managing GPU memory and coordinating execution.13 CUDA was designed to work with NVIDIA GPUs starting from the G8x series (GeForce 8 series) onwards.59 NVIDIA’s explicit goal with CUDA was to position its GPUs as powerful, general-purpose processors for scientific computing and beyond.

In parallel, recognizing the need for a vendor-neutral standard for heterogeneous computing, Apple initiated the development of OpenCL (Open Computing Language).66 Apple collaborated with AMD, IBM, Intel, and NVIDIA before submitting the proposal to the Khronos Group, an industry consortium focused on open standards for graphics and compute.66 The OpenCL 1.0 specification was ratified and publicly released in December 2008, with initial implementations appearing shortly after, notably in Apple’s Mac OS X Snow Leopard in August 2009.

OpenCL was designed as a royalty-free, open standard framework for writing programs that could execute across a wide range of heterogeneous platforms, including CPUs, GPUs from different vendors (AMD, NVIDIA, Intel, etc.), Digital Signal Processors (DSPs), and Field-Programmable Gate Arrays (FPGAs).10 It defined a C99-based language for writing kernels and a set of APIs for managing platforms, devices, memory, and kernel execution.66 OpenCL supported both task-based and data-based parallelism.63 Following its release, major vendors like AMD integrated OpenCL support into their own compute frameworks (e.g., AMD Stream, replacing their earlier Close to Metal initiative), and NVIDIA also added OpenCL support alongside CUDA.

Despite OpenCL’s promise of cross-platform compatibility, CUDA gained significant momentum and became the dominant platform in many HPC and AI domains.50 Several factors contributed to this. NVIDIA heavily invested in the CUDA ecosystem, developing optimized libraries (like cuBLAS for linear algebra and cuDNN for deep neural networks), comprehensive development tools, and fostering a strong academic and research community.39 This tight integration between NVIDIA hardware and the CUDA software stack often resulted in superior performance and easier development compared to achieving the same on OpenCL across diverse hardware.73 While OpenCL offered portability in theory, developers sometimes faced challenges with inconsistent performance, feature support, and driver quality across different vendors’ implementations.73 Consequently, for developers targeting high-performance applications primarily on NVIDIA hardware, CUDA often presented a more productive and performant path.

The development of CUDA marked a turning point, transforming GPGPU from a specialized technique requiring graphics expertise into a more accessible and powerful programming paradigm. NVIDIA’s focused investment in the CUDA ecosystem provided developers with the tools and libraries needed to efficiently harness GPU power, significantly accelerating the adoption of GPUs in scientific computing and critically paving the way for the deep learning explosion. While OpenCL established an important open standard, CUDA’s early lead, vendor backing, and robust software environment proved highly influential in shaping the GPGPU landscape.

Architectural Shifts for Compute: Programmable Shaders and Unified Architectures
#

The transition to GPGPU was underpinned by fundamental shifts in GPU hardware architecture, moving away from rigid, graphics-specific pipelines towards more flexible and general-purpose parallel processing structures.

The first major step was the introduction of programmable shaders, evolving through distinct stages.24 Initially, GPUs featured fixed-function units for specific tasks like vertex transformation and pixel coloring (pre-GeForce 3 era).24 Then came the era of separate programmable shaders (DirectX 8/9, GeForce 3 through 7 series), where developers could write distinct programs for vertex processing and pixel/fragment processing.24 While offering more flexibility, this still maintained a separation based on the traditional graphics pipeline stages. A more profound architectural change arrived with the advent of unified shader architectures, pioneered by NVIDIA with its Tesla microarchitecture (G80 chip), which debuted in the GeForce 8800 GTX in late 2006.24 Unified architectures eliminated the dedicated hardware units for vertex, pixel (and later, geometry) shaders.24 Instead, they featured a pool of identical, flexible processing units, typically organized into Streaming Multiprocessors (SMs).24 Each SM contained multiple processing cores (often called CUDA cores in NVIDIA’s terminology) that could execute any type of shader program (vertex, geometry, pixel, or compute kernels).24 This unification allowed for dynamic load balancing and more efficient utilization of the GPU’s computational resources, as the hardware could adapt to the varying demands of different workloads without being constrained by fixed allocations for specific shader types.

The unified shader model represented a fundamental departure from the graphics-centric pipeline model, effectively transforming the GPU into a more general-purpose parallel processor.18 The architecture now resembled a large array of programmable SIMT cores, optimized for high throughput and massive parallelism.13 Key architectural components supporting this compute-centric view became more prominent: the hierarchical organization of execution (threads grouped into blocks, running on SMs), fast on-chip shared memory accessible by threads within a block for inter-thread communication and data reuse, and multi-level cache hierarchies (L1 per SM, shared L2) to feed the numerous cores efficiently.

This move towards unified architectures was instrumental in solidifying the GPU’s role as a powerful GPGPU device. It provided the flexible, scalable, and more homogenous hardware foundation necessary for efficiently mapping general-purpose parallel algorithms, as facilitated by programming models like CUDA and OpenCL. The rigid constraints of the graphics pipeline were effectively relegated to a software abstraction, allowing the underlying parallel compute engine to be harnessed more directly and effectively for a burgeoning range of non-graphics applications.

The Evolution of the GPU: From Pixels to Petascale AI - This article is part of a series.
Part 2: This Article

Related

The Rise of the Graphics Processing Unit
9 mins
GPU GeForce Graphics Card High-Performance Computing Parallel Computing NVIDIA 3D Acceleration Transform and Lighting GDDR6 HBM Integrated GPU Virtual GPU Machine Learning AI Hardware SIMD SIMT Direct3D OpenGL Voodoo Graphics Graphics History
Using Teraform to deploy Open Source AI stack
1 min
Guides Ai Open-Source