Why not the GPU as a CPU?

xFlankerx

Limp Gawd
Joined
Oct 30, 2005
Messages
259




Link to article.

My question is; If the GPU has such great processing power, then why don't we use them as the CPUs?

I mean...I don't know how they calculated that a 3.0GHz P4 does 12 gflops...(SiSoft Sandra says it does more like 3.8 gigaflops...) but still, if they used the same program, then the X1800XT would be 7x faster. If we could use a CPU 7x faster...that'd be crazy. So why can't we? And perhaps more importantly, why are the GPUs so powerful?
 
GPUs are good at what they do because it is a specialized piece of kit. There tasks are also inherently parallellizable (err... don't know how else to say it). A cpu is a general logic component.

I'm pretty much shocked that second slide from ATi themselves says why not a cpu? Uhm... WTF. Sure maybe it's not the most unfeasible thing in the world (really good at certain things making up for others it sucks at???).
 
The CPU is nothing more then a command router telling other parts of the machine what to do. It's general purpose. A GPU renders graphics, and a PPU renders the physics, the NIC gets network information, the SoundCard renders sounds.... I mean, the computer has many specilized components in it that the CPU is nothing more then a task manger then anything else.
 
A CPU is just that: a Central Processing Unit. Its main task is to move data from one location to another, possibly performing some calculations on it.

A GPU is a highly-parallel vector processor which is optimized for a small subset of possible calculations. A 'physics' processor is similar to a GPU in that it's also a vector processor, and thus good at matrix calculations (which are common in both graphics and physics calculations).

Mainstream CPUs are scalar processors. While things like SSE improve floating point performance a lot, a CPU is still not optimized for calculations alone.
 
Without a complete instruction set, a GPU would flounder hopelessly on many tasks that a CPU can buzzsaw through in no time. Also, especially on the desktop, there are very rarely more than 2 threads that need a large amount of CPU time, meaning that many of the ALUs in paralell will sit idle while one or two are hopelessly overloaded.

As a general rule, CPUs have scaled up while GPUs have scaled out. This is starting to change, as video card makers simply can't make GPU dies much bigger, while CPU makers are finding it hard to simply add more clock speed and call it a day. GPUs are gaining more advanced processing capabilities rather than simply hacking through work with raw fillrate, while CPU makers are adding additional cores to further increase their multitasking capabilities. They are getting closer together, but are still very much different.
 
Ah. Thanks a lot guys. You're a huge help. One more question, and I hope you haven't already answered it, but; The GPU is much stronger than the CPU right? And we all know the importance of a CPU. So would it be possible to take the GPU and optimize it for CPU usage? Or is the GPU's hardware totally reserved for graphics and some physics processing?

Last question. If its possible to design that strong a GPU, why isn't it possible to design a CPU of the same capabilities?
 
Best I can get out of it is... That a GPU like you inferred, is reserved for processing the graphics and everything to do with video... That is what it was made for so that is what it does... The CPU obviously does what it does too. I think the whole MFLOP thing is measured by what its doing... The GPU isn't doing as much so I would think that is why it is getting more "flops"
 
I think the reason why the gpu can do things like physics processing is because it is still a specific instruction set (much like graphics rendering), so I imagine things like sound processing could also be done by a gpu...
 
Not really, a GPU gets much of its FLOPS potential through heavily parallel processing. Look at how many pipelines we are talking here, 16-24. Take that X1800XL and divide the FLOPS mark by the number of pipelines and you get a number smaller than the P4 (16 in the X1800XL, right?). Most software is basically single-threaded and would only use 1 pipeline.

Also, FLOPS is a mark of processor performance, but most software isn't very FLOPS sensitive. Software tends to have a lot of branches, which is why CPU makers have invested a lot of work in branch prediction hardware.
 
CPU : General (Brain)
GPU : Video (Eyes)
SoundCard(SPU..anyone?) : Sound (Ears)

They can all be better then another at doing something they were made to do, because that is why they were made in the first place. ;)
 
You can; it's just that the specialized instruction set of the GPU doesn't lend itself conveniently to general-purpose computing. There's some apps which are helped. http://www.gpgpu.org/ has lots of notes and resources.

The best news is that the GPU has great bandwidth, so for memory-intensive things the awkward instruction set can be overcome for a great result.
 
Dont buy into the floating point calculation benchmark, I mean alot of what gpus do require floating point calculations, whereas cpu do quite a bit more than floating point operations. Out of order execution comes to mind.
 
wouldnt it be kind of like going backwards? before there were gpus cpus did all the work, so it would go from having cpus to having cpu's+gpus then back to one processor that does it all again.
 
How did you get back to one processor, darkhorse? We're talking about asymetric multiprocessing.
 
tornadotsunamilife said:
I think the reason why the gpu can do things like physics processing is because it is still a specific instruction set (much like graphics rendering), so I imagine things like sound processing could also be done by a gpu...

I'm not too sure about that. The branching ability of SM3.0 i think is what made it possible to do general computations (If a=b then...) instead of linear ones. AFAIK, except for programmable shaders, all other conditionals in the GPU are hardwired, it can't do anything outside pushing polygons.

GPU:
1+1=2
1+1=2
1+1=2
1+1=2
Does multiple specifically formatted data simultaneously.

CPU:
A+B=C;A+B=C;A+B=C;A+B=C
Does general computations as fast as possible.

Correct me if i'm wrong please.

EDIT: Whoops, misread your post. Sorry (Me sleepy Zzzzzz...). For something simple and linear like sound, the GPU can do that. Actually, it's already been done. Forgot the link to that tho.
 
Sorry if this sounds stupid but, if the CPU is the transporter of data from place to place, then what does the system bus (FSB, HyperTransport Bus) do?
 
xFlankerx said:
Sorry if this sounds stupid but, if the CPU is the transporter of data from place to place, then what does the system bus (FSB, HyperTransport Bus) do?
The CPU initiates most transfers, the system bus is where the data moves through.
 
Elledan said:
The CPU initiates most transfers, the system bus is where the data moves through.
It's kinda like a non-donut-eating traffic cop. It directs some very high-speed traffic in a multitude of directions.
 
GilmourD said:
It's kinda like a non-donut-eating traffic cop. It directs some very high-speed traffic in a multitude of directions.

The CPU? Not really. Your traffic cop has more in common with the memory controller, the northbridge, or the southbridge.
 
Why not use a Porshe to haul cargo?

Still uses an internal combustion engine...

Designed to do a different task
 
MartinX said:
Why not use a Porshe to haul cargo?

Still uses an internal combustion engine...

Designed to do a different task

I wonder what you're talking about, or to whom you meant to address your comment.
 
xFlankerx said:
Ah. Thanks a lot guys. You're a huge help. One more question, and I hope you haven't already answered it, but; The GPU is much stronger than the CPU right? And we all know the importance of a CPU. So would it be possible to take the GPU and optimize it for CPU usage? Or is the GPU's hardware totally reserved for graphics and some physics processing?

No the GPU is not stronger than the CPU. Not meaning any insult to anyone, you are trying to compare the equivalent of an idot savant (GPU) who may well be able to memorize and recite backwards an entire city phone directory to an Einstein, who may probably can't memorize a phone book, let alone recite it backwards, but who is more than capable of expanding the sum of all knowledge.

xFlankerx said:
Last question. If its possible to design that strong a GPU, why isn't it possible to design a CPU of the same capabilities?

All processor designs involve compromise. When the designers of a GPU have to make a compromise, then tend to do so in a manner that will let them process / produce graphics faster. They are much more likely to add an extra vertex shader than more cache. A CPU designer OTH knows that vertex shaders have only a narrow user group while additional on-chip cache will likely speed up all processing operations. They'll choose cache over a shader.

One should also realize that processor to processor-memory bandwidth is dedicated in the case of the GPU. It doesn't have to worry about disk and other i/o controllers accessing it.
 
Ryder said:
Best I can get out of it is... That a GPU like you inferred, is reserved for processing the graphics and everything to do with video... That is what it was made for so that is what it does... The CPU obviously does what it does too. I think the whole MFLOP thing is measured by what its doing... The GPU isn't doing as much so I would think that is why it is getting more "flops"
Its important for everyone to understand what a "flop" is; A "flop" is a floating point calculation, and incase your not familiar with what a floating point is, it is a number with a decimal place somewhere in it. If i remember back to my C/C++ classes, a floating point (refered to as a 'float') by default uses 4 bytes.

So, while a videocard can perform more floating point calculations per second, it is designed solely to render images. A videocard also does not contain the same OPCODE's that a CPU has. It has special OPCODE's for rendering different effects, thus the need for a hardware compliant dx9 videocard for certain effects in DOOM3, most noteably the heat wave effect when looking at flames. This is also why completely hardware compliant dx9 videocards perform so much better in dx9 environments when they might perform comparatively in a dx8 environment to a non dx9 compliant videocard.

broberts said:
No the GPU is not stronger than the CPU. Not meaning any insult to anyone, you are trying to compare the equivalent of an idot savant (GPU) who may well be able to memorize and recite backwards an entire city phone directory to an Einstein, who may probably can't memorize a phone book, let alone recite it backwards, but who is more than capable of expanding the sum of all knowledge.
Nailed it right on the money.


edit:

For the record, a CPU does alot more than just route data to different parts of the CPU, it controls those parts, while performing the majority of the calculations (except when in-game when i would say a videocard does alot more!) that take place on the system.
 
Theres been some work in the field on general purpuse usage of GPU's. Obviously you can't just drop the CPU and rely fully on the GPU for all your computations, but specialized tasks can be improved since GPU's are all vector based. One of the stories had a video which showed the visualization of the computations (a neat side effect), and IIRC the task was completed 4x faster using the GPU than the CPU (it was some space gas modelling, I'll try to hunt the link). It's been covered on slashdot a few times and here are some relevant links:


http://www.cs.washington.edu/homes/oskin/thompson-micro2002.pdf
http://graphics.stanford.edu/projects/brookgpu/
 
Thanks for the wiki but I didn't read it. Can you give an example of an analogy? :)
 
Monkeys -> Shakespeare.
Idiots -> Technical discussions.
:D
 
put it this way if ATI could turn their GPUs into processors and sell them I'm sure they would. But if AMD or Intel catch wind of that good luck with ATI having any more big friends
 
broberts said:
No the GPU is not stronger than the CPU. [...]
All processor designs involve compromise. When the designers of a GPU have to make a compromise, then tend to do so in a manner that will let them process / produce graphics faster.

I think this thread came to an end when broberts nailed the intial question on the head. Any form of engineering/ design requires compromis and trade-offs. A GPU is designed for a very specific task -render 3d graphics- and can therefore be designed using those assumptions. GPU engineers can increase performance by losing the ability to make general computations.

 
Back
Top