Viewing a single comment thread. View all comments

TheLuteceSibling t1_j6la8wn wrote

The CPU is really good at task-switching, doing a bunch of things basically all at once.

They GPU is designed to configure itself to ONE task and to do the same thing bazillions of times per second.

It's like comparing a tractor to a sports car. They're fundamentally different machines.

108

Easy_Reference6088 t1_j6lappn wrote

To add onto this. The cpu could be the gpu as well. It would just be painfully slow. It's called "software rendering"

Edit: The cpu doing software rendering would not technically be a gpu in name, but it's acting as a really slow one.

58

WeirdGamerAidan OP t1_j6lb06f wrote

Yes, it's annoying when that happens, sometimes my computer will forget it has integrated graphics when I load a game then it renders with the cpu and gives me like 1 fps

12

kanavi36 t1_j6ligt3 wrote

Small correction, integrated graphics is usually the name for the CPU doing the graphics workload. The GPU would be dedicated or discrete graphics.

−12

rob_allshouse t1_j6lkimz wrote

No. There is a GPU in “integrated graphics” provided by Intel or AMD. It is comparatively weak to a discrete GPU, and often uses shared memory instead of dedicated memory, but it’s definitely a GPU.

14

Mayor__Defacto t1_j6lpxre wrote

Integrated graphics is not the CPU doing the graphics workload, it’s the name for a CPU designed with a GPU component and shared memory between the CPU and GPU. It’s a sort of SOC.

10

WeirdGamerAidan OP t1_j6ljzn3 wrote

In that case why does windows recognize them separately in task manager (with separate status windows and everything)?

5

ThatGenericName2 t1_j6lmf86 wrote

It doesn't, the person that replied to you is incorrect.

Some CPUs have a low power GPU integrated into it, hence Integrated GPU, and not all CPUs have them.

These Integrated GPUs are very weak and are meant for the bare minimum of graphics processing, enough to draw the interface of a word document or other programs and that's about it. Attempting to do anything complicated such as 3D rendering, even really simple ones will start to strain it.

Despite this these Integrated GPUs are still much better at graphics processing than software renderers that actually use the CPU.

27

salvodan t1_j6m0a82 wrote

And before integrated GPUs or even discrete low-powered GPUs the User Interface was rendered using the CPU itself (software rendering). This was a long time ago, back in the old days of text interface in CGA and simple 2D sprites. (1980s)

6

Bensemus t1_j6nrvtz wrote

This is more true of Intel iGPUs. AMD APUs were actually designed for light gaming as their integrated GPUs actually had some power.

1

AdiSoldier245 t1_j6lp924 wrote

An integrated GPU is a seperate GPU inside the processor, it's not using the CPU to compute graphics. If you look at internal layouts of a processor with an iGPU, you'll see the GPU as a seperate object. So displaying doesn't slow down the CPU part of the CPU(that much, there could be bandwith issues).

A discrete GPU is what goes into a pcie slot and is a GPU outside of the processor. This is what most games require as the iGPU is mostly only enough for displaying and maybe processing video.

Software rendering is using the CPU cores themselves to do graphics tasks.

5

kanavi36 t1_j6lnygb wrote

After posting my reply I considered I might have been incorrect in what I assumed from your comment, so I apologise. I assumed you were talking about when a game doesn't select the dedicated graphics and defaults to the integrated graphics on the CPU, which is quite common and would lead to low frame rates. I've never actually heard of a CPU skipping the integrated graphics and directly rendering a game, which sounds interesting. What does it appear as in your task manager?

2

WeirdGamerAidan OP t1_j6miuo3 wrote

When it happens, as soon as I load up the game cpu usage skyrockets to 100 and gpu stays low, and the game runs at like 1 fps. Happens the most with Roblox and Superliminal. I usually have to reload those games several times before it works properly.

1

WeirdGamerAidan OP t1_j6miy85 wrote

I don't recall if in task manager it shows it's using the gpu

1

kanavi36 t1_j6o4db3 wrote

Interesting, and also quite strange. What CPU do you have?

2

WeirdGamerAidan OP t1_j6oevbx wrote

Uuh I think it's an i7 but I'm not at home rn so I can't check. I'll try to find the laptop online and see what the cpu is. If it helps task manager displays the integrated graphics as "intel hd graphics 620"

1

WeirdGamerAidan OP t1_j6ogx1l wrote

Online search was partly successful. It is either an i7-7500U, i5-8250U, i5-7200U. Iirc I think it's the i5-8250U

1

TheSkiGeek t1_j6p31rr wrote

“Integrated graphics” or an “integrated GPU” these days almost always refers to a small(er)/weak(er) GPU that is included in the CPU itself.

From the perspective of the operating system, a ‘discrete’ GPU and the ‘integrated’ GPU are both rendering devices that it can access. In a laptop with discrete graphics, both of these are usually able to output to the built in display, so a game or other application can choose to render to either one. That’s usually where you see things getting confused, as the BIOS or OS might be configured with the integrated graphics chip as the first/default rendering device.

It’s also possible to do pure software rendering using only the CPU. Nobody actually wants to do this these days for real time applications, since it is painfully slow. But it is an option.

1

Sneak-Scope t1_j6lrgbb wrote

It's been a minute, but is this just incorrect? The CPU is much worse at task switching than the GPU.

The CPU is meant to be a generalist and so is bereft the purpose built hardware to excel at anything. Where the GPU is built to slam numbers together in a disgustingly parallel fashion.

I have been in airports for twenty hours now so I'm sorry if that's wrong!

10

ExtremelyGamer1 t1_j6mh9z7 wrote

Yes you’re right the GPU is better at task switching which is why it is good at parallel tasks. It can switch between threads so that it never has to wait too long on it to finish.

5

psycotica0 t1_j6mmonh wrote

I think it depends on what they meant by task switching. I think they meant "do a bit of game, then do a bit of web browser, then read some files, then back to game".

The GPU is good at doing the same "task", but a billion times, often with a huge amount of parallelism. So it's obviously good at switching from doing that task on one thing to doing that task on the next thing, but in the end it's still the same task.

4

Sneak-Scope t1_j6nptjl wrote

I guess so, though I think it's being used wrong in that context. In the context of CPU/GPU, 'task switching' describes the hardware's ability to park a thread and start a different one executing.

In the case of the CPU, it has to dump cache to main memory, load new information and continue. Where the GPU, usually, is just like 'lol pause play!'

2

TheSkiGeek t1_j6p44cp wrote

That’s because GPUs don’t really cache anything, they’re running a program that streams data from one part of VRAM, transforms it, and writes it back to another part of VRAM.

If the OS wants to change what the CPU is doing it just jumps it to another block of code in RAM. Programs can spin up their own threads in real time. With a GPU there’s a whole process that has to be gone through to load or unload shaders, map and allocate VRAM, etc. — it’s much less flexible, and the latency of swapping from one kind of calculation to another is much higher.

2

spectacletourette t1_j6luakc wrote

Just to add…

> and to do the same thing bazillions of times per second.

That’s why GPUs are also used for cryptographic calculations, even though that’s not the task they were originally intended for.

9

WeirdGamerAidan OP t1_j6laroy wrote

Yes, but wouldn't the GPU not know what to display if the CPU didn't tell it what to display? Or is it more like the CPU tells it "throw this object here and this object here, figure out how to put it on a screen" (albeit much more complex and many more objects)?

3

lygerzero0zero t1_j6lhvyy wrote

The CPU hands the recipe to the GPU, and the GPU actually cooks it. Knowing the recipe is not the time-consuming part, it’s the actual cooking.

33

neilk t1_j6lf4hb wrote

The CPU is like "here are all the 30 thousand triangles that represent this thing, and here is the angle from which I would like to view it. Please do the complex mathematical transformations that a) rotate all 30 thousand triangles in space b) project all 30 thousand triangles from 3D space into 2D triangles on a screen"

There's also stuff to figure out what parts of the model are hidden from view, reflections, textures, shadows, etc, but you get it.

24

TheLuteceSibling t1_j6lbu0x wrote

There are different techniques, but you can think of it like the CPU figuring out where all the objects are and then handing it to the GPU.

The GPU applies, color, texture, shadow, and everything else. Putting chess pieces on a board is easy. Making them look like marble is much more intense.

9

RSA0 t1_j6lt8mn wrote

The programmer decides, which tasks will be performed on CPU, and which - on GPU. GPU is a full capability processor that runs its own program, so in theory there is no limit on what it can do - the only limit is time. The programmer must write a program for GPU as well as for CPU. Programs for GPU are called "shaders".

If we talk about games, the GPU usually does at least 3 jobs: convert all 3D models to screen-relative coordinates, sample colors from texture images, and calculate light and shadow. However, more tasks get moved on GPU with time: modern games use it for simple physics simulation (hair, clothes, fire, smoke, rain, grass), and for post-processing (color correction, blur).

GPU can also be used in tasks unrelated to graphics. Many scientific physics simulators and machine learning tools have an option to run on GPU.

4

Xanjis t1_j6lf95a wrote

It's the second. The GPU takes all the information for the scene (the location/size/rotation) of objects in the scene and then calculates what color each pixel the screen can display. That calculation needs to be done millions of time per second but it's a very simple calculation so the GPU is suited for the task because it has a huge number of weak cores. Whereas a cpu has a small number of incredibly powerful cores.

3

Sevenstrangemelons t1_j6lcdrq wrote

Generally yes, but the GPU is the one actually executing the instructions containing the calculations that would otherwise be really slow on the CPU.

2

LSF604 t1_j6lkljr wrote

GPUs are better at parralel processing thanCPUs but much more special case.

3

led76 t1_j6lxf6p wrote

It might be eli5 to say that the GPU is really good at multiplying grids (matrix) of numbers together. Lots of them. At the same time. And grids of numbers are great at representing things in 3D, like in games.

A CPU can do it, but when there’s bajillions of them to multiply together best to go with the thing that can do hundreds at a time instead of a handful.

2

DMCer t1_j6m3wzz wrote

If rendering were squats: The CPU is the brain, the GPU = the leg muscles.

1