What can a GPU do that a CPU can’t and vice versa?

300 views

What can a GPU do that a CPU can’t and vice versa?

In: 27

15 Answers

Anonymous 0 Comments

I’m not the most technologically advanced person but I feel like I could still give a decent description.
A CPU can’t dedicate all of its resources to a graphic, certain games these days can’t even be played without a decent GPU. On the other hand, GPUs can’t complete many of the basic tasks that a CPU does. For example, you can run a system with a CPU and no GPU, but not the other way around.

Anonymous 0 Comments

A GPU is an example of an Application Specific Integrated Circuit. It’s going to do a lot of specific kinds of operations over and over again. It’s going to do those specific kinds of operations so often that rather than using software to write some of those instructions, you write that logic directly in the hardware.

That means that your GPU can’t do other kinds of operations as well, since at a hardware level, it doesn’t really have that kind of general purpose computing power. However, it is very good at doing the specific tasks we give it.

Anonymous 0 Comments

A CPU is a room full of trained professional of the highest order. Need an intricate piece of work in the shortest timespan? ask the CPU.

A GPU is an entirey factory full of assemblymen. Need a metric fuckton of quickly-assembled wares? ask the GPU.

In practice, this means the CPU handles most general-purpose workloads and most complex calculations.

The GPU by contrast only handles workloads that are can be highly concurrent and don’t require immense computing power per task. The most well-known example for that is calculating the color of every pixel on the screen several times per second – a not-too-difficult task on its own, but there are about 2B pixels on a full HD screen. Less common applications are f.e. machine learning, which deals with huge amounts of mostly independant training sessions.

Anonymous 0 Comments

a CPU can do everything and anything. a GPU can only do a smaller subset of what a cpu can do. but GPU’s have more “cores”and are simpler so they can do the smaller subset at a faster rate since there are more of them and they are designed solely to do that smaller subset of work.

a CPU is a guy at your job who can do everything. a GPU is the person in an assembly line that can only do one thing.

Anonymous 0 Comments

A CPU is like a master carpenter who makes cabinets. The carpenter works much faster than an unskilled worker and can take into account custom requests and odd angles. The downside is that they cannot produce many cabinets since they are just one person.

A GPU is a manufacturing factory full of unskilled workers mass-producing cabinets. Each individual worker is slower but because there are so many, the factory produces cabinets much faster. However, they need some oversight by a master carpenter/engineer and the process needs to be well designed so that unskilled workers can produce it. It’s not like you can tell the line to make a modified cabinet without changing the overall workflow.

CPU is good for general tasks and tasks that is just one process. GPU is good large tasks (like vectors and matrices for display and graphics) but need to be carefully structured.

Anonymous 0 Comments

Their layout is different.

Graphic processing requires doing a lot of simple tasks over and over again or in high number, CPUs are designed to do complex tasks and handle a variety of instructions, so they are slow for doing that kind of thing. A GPU is basically a bunch of small “units” that can do those small tasks well enough and you can have a bunch of them inside a GPU, so you can get do these simple tasks with a lot more speed.

A CPU can do what a GPU does, it’s just slower, as for a GPU, it can also do whatever a CPU can (they are both turing complete), but a GPU is ill-suited to do many of the tasks a CPU does, that’s why they are not used as a replacement for a CPU, because while it can do a lot of simple tasks in parallel, it would be slower than a CPU to do a complex task.

Anonymous 0 Comments

It sort of depends on the GPU (instruction set) but very likely a CPU and GPU could eventually do the same things, in theory. A CPU is designed with certain performance features allowing it to do certain things faster and better than a GPU (like the ability to address larger memory, general purpose instructions and some dedicated control lines for peripheral devices etc). A GPU is a special purpose processor typically designed to handle a smaller set of instructions simultaneously and very quickly – a necessary feature to handle graphic operations.

Ultimately though, if someone bothered to write the code for it, a GPU would most likely be able to handle what a CPU does albeit rather badly. A CPU can also be coded to handle GPU tasks but it would probably do it very slowly.

It is like comparing a race car with a road truck. Both will be able to accomplish moving stuff from one location to another. One is more suited for passenger comfort and speed, the other for carrying capacity. You could always take passengers in a truck and you can nearly always make multiple trips on a truck to more or less achieve the same goals.

Anonymous 0 Comments

CPU is for linear processing while GPU is for parallel processing. Imagine at the grocery store you had only one checkout clerk. Everyone would have to wait in line while the clerk checks out everyone one at a time, this is like a CPU. The GPU is like having 100 self-checkout lanes open so many people can check out at one time. Since the CPU is the fastest clerk, you would want him to check out the customer hauling the massive overflowing cart. While most customers with a basket full of groceries can take one of the many self-checkout lanes.

When rendering a computer game screen for example, the color of each pixel needs to be calculated. A 1920×1080 display would over 2 million pixels to calculate each frame. The GPU is used for this. The logic of where the characters move and how much damage the take etc. is calculated by the CPU. GPUs are also used for machine learning and cryptocurrency mining.

Anonymous 0 Comments

“HD” (1K) screens are composed of “pixels” of color, 1920 columns x 1080 rows = 2 million pixels (dots of color). To eliminate flicker in the image, these pixels have to be “refreshed” 60 times per second, so the video card has to calculate 120 million dots of color per second. A 4K display has 16 times that, so 1.9 billion dots of color per second that must be calculated.

So the typical graphics card has some 2000 “processing cores” and a large amount of very fast memory, dedicated to the simple math of converting one color to another. As far as the computer is concerned, [colors are just integer numbers](https://dataveld.com/wp-content/uploads/2019/12/Power-BI-Theme-Color-Reference.png) (expressed in hex code rather than binary code in that chart), so the math is very simple additions/subtractions and multiplications of integer numbers.

The computer processor, on the other hand, must execute programs and instructions, and something like a business application (Microsoft Word for example) can have quite complex instructions in its code. The processor is optimized to execute complex instructions and decision-making (if, then, while, etc.), so typically it has 2-8 “cores” that are surrounded by several layers of “cache” memory (small memory that’s used like scratch pads to keep track of the instructions and bits of data that the processor is working on). The math includes logic decisions, and also can include complex math (trigonometry, exponentials with non-integer numbers, etc.).

Anonymous 0 Comments

Cpu is like a boss and gpu is the workforce.

The boss by himself can’t get much done so he needs hundreds of people to get things going. The harder the task the more people the boss needs.

However the workforce itself is useless without the boss because they need to be told what to do and how and when etc.