Running CPU type processes on GPUs?

Swanny

Diamond Member
Mar 29, 2001
7,456
0
76
Hello all,

We've been discussing this topic in a thread here in DC. Basically I offered the idea that with the ever expanding programability and new floating point capabilities of DX9 compatible video cards we should soon be able to run some CPU type tasks on our GPUs. One such application is SETI@Home, since it loves memory bandwidth (which graphics cards have a lot of) and is heavily floating point biased. So my question is this: How hard would it be to code a program like SETI@Home to run most of it's calculations on the GPU. In even simplier terms: How hard is it (or is it possible to) turn a GPU into a CPU (either partially or totally). You can read through the linked thread to see some of the other questions asked.


Thanks,
Swan
 

technician

Senior member
Jun 10, 2001
314
0
86
The Radeon 9700 could have that capability. If you read the 9700 preview (here on Anandtech I believe), it's mentioned that applications such as 3D Studio MAX have the potential of being run completely off the GPU.

For now, where this comes in handy the most is in high-end 3D rendering applications. Due to the extremely programmable nature of the R300 (and other forthcoming DX9 GPUs), it will be possible to actually compile and run code (for example 3D Studio Max or RenderMan code) on the GPU itself. Currently 3D rendering is done entirely by your host CPU, but with proper software support, you will be able to render 3D scenes much quicker on these powerful GPUs.
Link to article

ATI's RenderMonkey Application will take code from any high level language and compile it to R300 assembly (e.g. RenderMan > R300 asm)

RenderMonkey screenshot.

Hope that explains your question. I think RenderMonkey would be especially of interest to you...
 

Swanny

Diamond Member
Mar 29, 2001
7,456
0
76
Cool, I had forgotten that part of the AT article. If that RenderMonkey program can translate the code, it should be fairly painless.

Thanks for the response.
 

Shalmanese

Platinum Member
Sep 29, 2000
2,157
0
0
Well, with Nvidias CG (C for graphics) and ATI's Render moneky, Im sure it wouldnt be all that hard to whip up a decent SETI client. The network code would be tricky though.... I wonder if you could get a DVI -> Cat5 adaptor and use the second head of your video card as a Network card?...
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: Shalmanese
Well, with Nvidias CG (C for graphics) and ATI's Render moneky, Im sure it wouldnt be all that hard to whip up a decent SETI client. The network code would be tricky though.... I wonder if you could get a DVI -> Cat5 adaptor and use the second head of your video card as a Network card?...

Why not just send the results back over the AGP port? it IS bidirectional....
 

rbhawcroft

Senior member
May 16, 2002
897
0
0
couldnt you just get the CPU to offload some of the processing instead of doing a separate programme?
 

Swanny

Diamond Member
Mar 29, 2001
7,456
0
76
Originally posted by: rbhawcroft
couldnt you just get the CPU to offload some of the processing instead of doing a separate programme?

My idea was to run as seperate of a process as possible. Some of the things the GPU couldn't do (like access the HD to save the WU or send it over the network), so those would have to be offloaded to the CPU. But what I was thinking was 2 SETI processes, one regular running off the CPU and one modified, running as much as it can off the GPU.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
sweet! cheap multiprocessing using the gpu. are there any gpus general enough that this can be done?
 

Menelaos

Senior member
Oct 10, 1999
251
0
0
sweet! cheap multiprocessing using the gpu. are there any gpus general enough that this can be done?

@400$ a card???

Overhead will be to large IMHO. GPU's are still quite a bit different from CPU's. And besides, I think you would need an OS hack.

Menel.
 
Jun 18, 2000
11,192
765
126
Originally posted by: jhu
sweet! cheap multiprocessing using the gpu. are there any gpus general enough that this can be done?
I agree with Menelaos. These cards are anything but cheap. Though, even at $400 a piece they may potentially be several times faster than even top of the line CPU's. I have to ask, how would one emulate the SETI calculations on the GPU? A pixel shader? It isn't like you can send a numeric value to the GPU and ask it to execute a mathematical computation for you. You're still limited to the DX9/OGL2.0 specifications.
 

Swanny

Diamond Member
Mar 29, 2001
7,456
0
76
Originally posted by: KnightBreed
Originally posted by: jhu
sweet! cheap multiprocessing using the gpu. are there any gpus general enough that this can be done?
I agree with Menelaos. These cards are anything but cheap. Though, even at $400 a piece they may potentially be several times faster than even top of the line CPU's. I have to ask, how would one emulate the SETI calculations on the GPU? A pixel shader? It isn't like you can send a numeric value to the GPU and ask it to execute a mathematical computation for you. You're still limited to the DX9/OGL2.0 specifications.

I agree it's not cheap, but if you're going to have one anyway, you might as well use it.

And as for the emulation, that's why I posted here!

 

Benedikt

Member
Jan 2, 2002
71
0
0
Hi guys, I have one nice news for ya:

I read the c't magazine very often (quite good german mag) and in one of the last issues there was mentioned, that Nvidia has recently shown Conway's game of life on a geforce 4, generating far more iterations than any other pc cpu is capable of right now. As I said, I don't remember the number of iterations/sec, but they mentioned, that it's incredibly high due to the geforce 4's very fast memory speed.

Imagine game of life on a Radeon 9700 :)))) holy shit.

Cu

Bene
 

Benedikt

Member
Jan 2, 2002
71
0
0
I was thinking more about this topic,

how would it be to have gpu-supported divx encoding??? Wow, the speed must be incredible. But, I don't know, I think you need a FPU capable gpu for that (e.g. Radeon 9700)???
This would be interesting for me as I'm encoding movies quite often.

Cu

B. W.
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
SETI is totaly memory speed dependant. It should kick major ass on a GPU. The problem would be compiling the software to work on all the pipelines of the GPU, instead of just one. Maybe compilation for a 4-8 ( depending on pipelines ) CPU sysem would work?
 

Benedikt

Member
Jan 2, 2002
71
0
0
I think the problem is to get the gpu acting like you want, I mean, is the instruction set of modern gpu's enough for executing x86-like software?? Who knows? Any low-level vertex-shader developers in here, who could answer this question? This is simply too heavy for me :)

Cu

Bene
 

MadRat

Lifer
Oct 14, 1999
11,965
278
126
Maybe you could do it far simpler by using the CPU to translate the results. The data would be passed by the CPU to the GPU as a specific set of information and then the GPU would manipulate the information as if it was video data. The video information sent to the GPU would be manipulated by the DX9-compatible calls, but the output would need to be passed back through the AGP port to the CPU to be re-translated into something useable. Each program would likely have to be videocard specific to work. You'd still be limited by the CPU but its probably possible to do it.
 

crypticlogin

Diamond Member
Feb 6, 2001
4,047
0
0
So what kind of instructions does a GPU handle, explictly? I'm guessing that'd be the limiter in terms of what apps the GPU is better suited for, but if I'm guessing correctly, there's probably some kind of vector rotation and vector dot product (or equivalent) instructions?

If that's the case, a GPU port of SETI@Home would probably fly since the client mainly does fourier transforms over and over again, and FTs can be done with a couple of vector rotations, dot products, and sums. It wouldn't be the most efficient FFT technique but I guess the speed could make up for that. :p
 

McCarthy

Platinum Member
Oct 9, 1999
2,567
0
76
I can see it now, DC people starting a letter writing campaign to get ATI to release a PCI version of the 9700 so they can have 6 per computer (including the AGP one) all crunching away with the CPU serving their IO needs and crunching on it's own when it has a spare cycle. :)

Hey, I'm only kidding a little, I'd love to see it done.

--Mc
 

Sukhoi

Elite Member
Dec 5, 1999
15,342
104
106
Originally posted by: McCarthy
I can see it now, DC people starting a letter writing campaign to get ATI to release a PCI version of the 9700 so they can have 6 per computer (including the AGP one) all crunching away with the CPU serving their IO needs and crunching on it's own when it has a spare cycle. :)

Hey, I'm only kidding a little, I'd love to see it done.

--Mc

That would be incredible! :D

 

Swanny

Diamond Member
Mar 29, 2001
7,456
0
76
Originally posted by: McCarthy
I can see it now, DC people starting a letter writing campaign to get ATI to release a PCI version of the 9700 so they can have 6 per computer (including the AGP one) all crunching away with the CPU serving their IO needs and crunching on it's own when it has a spare cycle. :)

Hey, I'm only kidding a little, I'd love to see it done.

--Mc

I don't have near that much money:Q
 

McCarthy

Platinum Member
Oct 9, 1999
2,567
0
76
Very cool!

Total mPower 4 X 400 MHz G3 with 128 MB of SDRAM - TPG3-4400-128 $3,200

Very uncool!

Now if Asus/Abit/Soyo/Shuttle/ECS/whoever would make a bare socket A or socket 478 board for $30, you supply your own ram and CPU how many would you guys buy? :)

Hmmmmm.

Since each would be transfering data across the PCI bus in the same format you could use up your old Duron 900 on one card along with that 1.6A OC'd to 2.4 in the slot next to it while your regular CPU does it's own thing. And when it's busy for games or whatever the others could still be going full bore. Ok, two slots away for cooling. But still...hmmmmm. Be a great way to use up old hardware and continue to get use out of it till for pennies without keeping entire systems, and as far as the software needed to do it I wouldn't think it'd be any more complicated than the GPU idea, actually quite a bit less. Just need to get people focused on talking one board manufacturer into supplying the PCI cards.

Make sense to anyone else, fatal flaws?

--Mc