WHAT IS CUDA?
Intro to Parallel Programming
An open, online course from Udacity
Instructors: Dr. John Owens, UC Davis and Dr. David Luebke, NVIDIA
CUDA® is a parallel computing platform and programming model invented by NVIDIA. It enables dramatic increases in computing performance by harnessing the power of the graphics processing unit (GPU).
With millions of CUDA-enabled GPUs sold to date, software developers, scientists and researchers are finding broad-ranging uses for GPU computing with CUDA. Here are a few examples:
Identify hidden plaque in arteries: Heart attacks are the leading cause of death worldwide. Harvard Engineering, Harvard Medical School and Brigham & Women’s Hospital have teamed up to use GPUs to simulate blood flow and identify hidden arterial plaque without invasive imaging techniques or exploratory surgery.
Analyze air traffic flow: The National Airspace System manages the nationwide coordination of air traffic flow. Computer models help identify new ways to alleviate congestion and keep airplane traffic moving efficiently. Using the computational power of GPUs, a team at NASA obtained a large performance gain, reducing analysis time from ten minutes to three seconds.
Visualize molecules: A molecular simulation called NAMD (nanoscale molecular dynamics) gets a large performance boost with GPUs. The speed-up is a result of the parallel architecture of GPUs, which enables NAMD developers to port compute-intensive portions of the application to the GPU using the CUDA Toolkit.
GPU COMPUTING: THE REVOLUTION
You’re faced with imperatives: Improve performance. Solve a problem more quickly. Parallel processing would be faster, but the learning curve is steep – isn’t it?
Not anymore. With CUDA, you can send C, C++ and Fortran code straight to GPU, no assembly language required.
Developers at companies such as Adobe, ANSYS, Autodesk, MathWorks and Wolfram Research are waking that sleeping giant – the GPU — to do general-purpose scientific and engineering computing across a range of platforms.
Using high-level languages, GPU-accelerated applications run the sequential part of their workload on the CPU – which is optimized for single-threaded performance – while accelerating parallel processing on the GPU. This is called “GPU computing.”
GPU computing is possible because today’s GPU does much more than render graphics: It sizzles with a teraflop of floating point performance and crunches application tasks designed for anything from finance to medicine.
CUDA is widely deployed through thousands of applications and published research papers and supported by an installed base of over 375 million CUDA-enabled GPUs in notebooks, workstations, compute clusters and supercomputers.
Visit CUDA Zone
for examples of applications in diverse vertical markets… and awaken your GPU giant.
HISTORY OF GPU COMPUTING
The first GPUs were designed as graphics accelerators, supporting only specific fixed-function pipelines. Starting in the late 1990s, the hardware became increasingly programmable, culminating in NVIDIA’s first GPU in 1999. Less than a year after NVIDIA coined the term GPU, artists and game developers weren’t the only ones doing ground-breaking work with the technology: Researchers were tapping its excellent floating point performance. The General Purpose GPU (GPGPU) movement had dawned.
But GPGPU was far from easy back then, even for those who knew graphics programming languages such as OpenGL. Developers had to map scientific calculations onto problems that could be represented by triangles and polygons. GPGPU was practically off-limits to those who hadn’t memorized the latest graphics APIs until a group of Stanford University researchers set out to reimagine the GPU as a “streaming processor.”
In 2003, a team of researchers led by Ian Buck unveiled Brook, the first widely adopted programming model to extend C with data-parallel constructs. Using concepts such as streams, kernels and reduction operators, the Brook compiler and runtime system exposed the GPU as a general-purpose processor in a high-level language. Most importantly, Brook programs were not only easier to write than hand-tuned GPU code, they were seven times faster than similar existing code.
NVIDIA knew that blazingly fast hardware had to be coupled with intuitive software and hardware tools, and invited Ian Buck to join the company and start evolving a solution to seamlessly run C on the GPU. Putting the software and hardware together, NVIDIA unveiled CUDA in 2006, the world’s first solution for general-computing on GPUs.
TOOLS AND TRAINING
Today, the CUDA ecosystem is growing rapidly as more and more companies provide world-class tools, services and solutions.
If you want to write your own code, the easiest way to harness the performance of GPUs is with the CUDA Toolkit
, which provides a comprehensive development environment for C and C++ developers.
The CUDA Toolkit includes a compiler, math libraries and tools for debugging and optimizing the performance of your applications. You’ll also find code samples, programming guides, user manuals, API references and other documentation to help you get started.
NVIDIA provides all of this free of charge, including NVIDIA Parallel Nsight for Visual Studio, the industry’s first development environment for massively parallel applications that use both GPUs and CPUs.
Learning to use CUDA is convenient, with comprehensive online training
available as well as other resources, such as webinars
. Over 400 universities and colleges teach CUDA programming, including dozens of CUDACenters of Excellence
and CUDA Research and Training Centers.