AtomSpark

Small discoveries. Wider horizons.

How Nvidia’s graphics chips found a second job training neural networks

Drawing a video game scene and training a neural network have something in common: both involve repeating a calculation across a great many numbers. A graphics processing unit (GPU) can calculate the colors of millions of pixels in parallel. Much of the work of training a neural network consists of multiplying large grids of numbers, or matrices, an operation that can also be split into many simultaneous calculations.

That fit explains why GPUs are useful for AI, but not why Nvidia became their dominant supplier. High-performance computing researcher Jeffrey Young points to three developments: software that opened graphics chips to other uses, an image-recognition result that persuaded researchers to use them, and competition to train larger models. Young has received hardware grants from Nvidia and has coauthored academic papers with current and former employees.

Before AI, programmers had to get beyond pixels

A computer’s central processing unit (CPU) is designed to handle a wide variety of complex tasks, a few at a time. A GPU trades some of that versatility for the ability to do many simpler operations at once. Early graphics programmers used small programs called shaders to specify calculations, such as determining a pixel’s color, that the GPU could repeat across an image.

In the early 2000s, Stanford University researchers developed tools that let programmers put that parallel hardware to work on calculations other than graphics. Their work helped lay the foundation for Nvidia’s Compute Unified Device Architecture (CUDA), released in 2007. With CUDA, scientists and engineers could write programs for Nvidia GPUs without having to express their problems in terms of pixels.

The payoff for AI became clear in the 2012 ImageNet challenge, a competition to identify objects in photographs. A neural network called AlexNet, trained on just two Nvidia GPUs, made far fewer mistakes than any rival entry. The result showed that GPUs made it practical to train a network large enough to outperform older recognition techniques. As AI researchers adopted GPUs, Nvidia already had years of work invested in the software they could use.

As models grew, chip design changed

In 2017, Google researchers introduced the transformer, a neural network designed for translation. Its accuracy improved as researchers increased the size of the model and its training dataset. Transformers went on to underpin chatbots and other generative AI systems, and the race to train larger models drove demand for data centers filled with high-end GPUs.

Chipmakers adapted the hardware to the workload. They added circuits specifically for matrix multiplication and used lower-precision numbers to speed up training. They also added more fast memory: the arithmetic units can only keep working if data reaches them fast enough. According to Young, leading AI GPUs can perform more than a quadrillion arithmetic operations per second.

Nvidia’s lead is not guaranteed. AMD makes competing GPUs, and Google designs its own AI chips, called tensor processing units. Cloud companies and startups are pursuing designs they say could run AI at lower cost and with less power. Those are promises, not established advantages.

Some limits lie outside the chip itself. The most advanced AI chips are fabricated largely by one company, Taiwan Semiconductor Manufacturing Co. Demand for AI hardware has also strained memory supplies for products including gaming graphics cards and smartphones. And for communities hosting data centers, the electricity needed to run the chips raises questions about power costs and environmental impacts. Faster arithmetic addresses only one part of the problem of training a larger model.