AI EDUCATION: What Is a GPU?

991

Each week we find a new topic for our readers to learn about in our AI Education column. 

Over the last several months as we’ve expanded our library of AI Education pieces, we’ve simplified the often confusing world of artificial intelligence. At their core, AI models are just software, and all AI as we currently know it is software-based, translating real-world inputs to digital form, processing them, and then delivering real-world outputs. Thus, most of our work has covered intellectual concepts like models, agents and different flavors of artificial intelligence.  

But underlying this software is a blend of legacy, newfangled and emerging hardware, and so far we’ve only scratched some of the surface of AI-related hardware topics, some of which are extant, like data centers, and some of which are just coming to light, like quantum computing. Today we’re going to discuss the graphics processing unit, or GPU. Let’s simplify this hardware for you: A GPU is a specialized integrated circuit microprocessor. Not simple enough? A GPU is a computer chip or microchip. It’s a very finely designed hunk of silicon. 

When someone my age (I’m a child of the early 80s) hears the word microchip, we’re most likely think of a CPU, or central processing unit. A CPU is the workhorse behind your personal computer at home, the laptop I’m writing this column on, and virtually all of our computerized devices and appliances. A GPU is very different. 

GPU Vs. CPU – A Little History 

CPUs are generalists. Because we use our home computers, laptops and devices for a wide range of tasks, from writing columns to keeping up with friends and family on social media to recording music, editing video and playing games, a CPU has to be able to handle a very wide range of tasks and to  multi-task. CPUs originally were built from a single processor, or core, but today they generally have between two and 64 cores. More cores mean more efficient processing and more multi-tasking. 

GPUs are specialists. GPUs became prevalent to the consumer more than 25 years ago not because we needed their processing power for cryptocurrency and artificial intelligence, but because we were asking our computers, even our personal computers, to complete more complex tasks regarding reading and editing graphics and video and playing computer games. In particular, the growing complexity of digital video and computer games increased the demand for a specialized processor that could cut down the time it took to do the same work with a CPU. Thus, the first GPUs were integrated onto motherboards at the heart of our computers, and only later generations of GPUs became “discrete,” or independent from the CPU and computer motherboard. 

This brings us to another key distinction between CPUs and GPUs: CPUs process tasks serially, meaning, one after another in sequential order. GPUs process tasks in parallel, all at once. That is why a GPU of similar power can process certain tasks much faster than a CPU. While a CPU has two or more very powerful cores, a GPU may have thousands of cores. The GPU can distribute the thousands of small tasks associated with running videos or games to its myriad cores for processing that often seems to be in real-time to the user. Thus, a couple of decades ago, among a niche set of video editors and power gamers, demand for ever more sophisticated GPUs was ignited, but with one caveat—GPUs, especially early-generation discrete GPUs, are extremely resource intensive compared to PCUs, requiring a lot of energy to complete their calculations. 

The GPU Ascendant 

Of course, a core group of gamers, designers, technicians and video artists wouldn’t be enough to raise the fortunes of GPU-specialist companies like Nvidia. The first push for GPUs came around the turn of the century, when consumers began to stream audio and video across the internet en masse. Streaming, which occurs in real time, required the power of a GPU to compress the video. 

The second big push came nearly a decade later from an entirely different source: The mysterious Satoshi Nakamoto. For the uninitiated, Satoshi Nakamoto is the nom de plume of the anonymous inventor of bitcoin, which was launched as a currency in 2009. Bitcoin mining, which serves to maintain bitcoin’s blockchain and produce new tokens, requires processing power to solve cryptographic puzzles and to verify new blocks. As it turns out, a GPU is capable of completing the tasks necessary to mine bitcoin much more efficiently than a CPU. 

Over the years, as large mining operations proliferated for bitcoin and other cryptocurrencies, GPUs also proliferated in a big way. Crypto miners built data center-sized operations stacked full of GPUs. GPUs can be combined, scaling up their computing power and the number of operations that can be conducted simultaneously, enabling crypto miners to create tokens faster—and potentially, also enabling them to drive profits faster. These crypto mining operations, interestingly enough, now serve as sort of a model for AI-related data centers. 

Enter Artificial Intelligence 

What does all this have to do with AI? Well consider machine learning, a flavor of AI we recently defined on AI Education. Machine learning requires a lot of different things to happen in parallel—broken down into a process, it actually resembles bitcoin mining. In machine learning, millions of different mathematical operations may have to occur simultaneously. While a CPU can be used to power machine learning, the nature of the task favors the use of GPUs. 

GPUs can handle more data more quickly than CPUs—so when constructing and training neural networks, using GPUs leads to results exponentially faster than using CPUs. So while GPU-makers like Nvidia took off during the rise of cryptocurrencies in the last decade, in this decade their growth is being pushed more by the ascendancy of artificial intelligence. GPUs are the preferred processing structure across all types of AI. 

Of course, none of this is lost on the GPU-makers. Nvidia and its competitors are moving towards the creation of AI-specific GPUs that will be even more powerful than earlier generation processors. There’s also been some movement towards more energy efficient GPUs as AI-specific use cases have emerged—but the development of energy efficiency is lagging demand for artificial intelligence and GPU-oriented data centers, and that is why we’ve seen the rush to develop and exploit new sources of electricity to power our AI-centric future.