Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Using GPUs For General-Purpose Computing

Posted by timothy on Sun May 09, 2004 01:47 AM
from the transfer-of-duties dept.
Paul Tinsley writes "After seeing the press releases from both Nvidia and ATI announcing their next generation video card offerings, it got me to thinking about what else could be done with that raw processing power. These new cards weigh in with transistor counts of 220 and 160 million (respectively) with the P4 EE core at a count of 29 million. What could my video card be doing for me while I am not playing the latest 3d games? A quick search brought me to some preliminary work done at the University of Washington with a GeForce4 TI 4600 pitted against a 1.5GHz P4. My Favorite excerpt from the paper: 'For a 1500x1500 matrix, the GPU outperforms the CPU by a factor of 3.2.' A PDF of the paper is available here."
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by drsmack1 (698392) * on Sunday May 09 2004, @01:50AM (#9098517)
    Now I finally have a use for the 20 Voodoo 2 cards I have in a box in the basement. Now I can have my very own supercomputer. I just need some six pci slot motherboards.... Instant cluster!
      • by PygmySurfer (442860) on Sunday May 09 2004, @07:30AM (#9099315)
        Unless those Voodoo 2s have magically grown T&L units, they're not going to do you much good.

        Maybe they have. They've been trapped in that box together in the basement for a long time.
        • Re:The day is saved (Score:5, Interesting)

          by Directrix1 (157787) on Sunday May 09 2004, @02:39PM (#9101457)
          Doesn't anybody find it annoying that 3-D operation is being hardwired into the video card to begin with? Why aren't we making 200million transistor math coprocessors with high bus speeds, uncoupled from the video card. This way we wouldn't have to keep getting a new video card every time we want to upgrade our systems 3-d performance. Since these operations are highly symmetric, you could put in an array of these into one machine to incrementally upgrade. Also, this would make the issue of how to access your GPU to use for other purposes irrelevant, as it would be a math coprocessor expected to be used as such anyways. And the best reason for doing it this way: OpenGL (and DirectX too) could become more of a thick software layer on top of the generic coprocessor, and since the coprocessors would eventually standardize on common instruction set, you wouldn't need a new version of OpenGL or DirectX for every new coprocessor release. What do you guys think?
  • What?!?!?! (Score:5, Funny)

    by DarkHelmet (120004) * <mark @ s e v e n t h cycle.net> on Sunday May 09 2004, @01:50AM (#9098518) Homepage
    What? Matrix operations run faster on a massively parallel form of vector processor over a general purpose processor? How can that be?

    Intel's been telling me for years that I need faster hardware from THEM to get the job done...

    You mean........ they were lying?!?!?

    CRAP!

    • by Anonymous Coward on Sunday May 09 2004, @03:11AM (#9098756)
      Don't worry, the Intel processor is *much* faster at the internet thingy. Graphics cards only do the upload to screen thing, and everyone knows the internet is all about downloading.

      And besides, nobody needs or wants Matrix operations anyway. Did you see how bad Matrix Reloaded was? That was *just* reloading, imagine how bad Matrix Multiplying is. You get the idea.
  • Googled HTML (Score:5, Informative)

    by balster neb (645686) on Sunday May 09 2004, @01:54AM (#9098535)
    Here's a HTML version of the PDF [216.239.57.104], thanks to Google.

  • video stuff (Score:5, Interesting)

    by rexguo (555504) on Sunday May 09 2004, @01:54AM (#9098538) Homepage
    At my work place, I'm looking into using the GPUs to do video analysis. Things like cut-scene detection, generating multi-resolution versions of a video frame, applying video effects and other proprietary technologies that were previously done in CPU. The combination of pixel shaders and floating-point buffers really make GPUs a Super-SIMD machine if you know how to exploit it.
    • audio stuff (Score:5, Interesting)

      by RobPiano (471698) * on Sunday May 09 2004, @02:12AM (#9098594)
      At my work we do audio stuff. It would be really neat if I could do some of the more complicated audio analysis (FFT etc) that requires lots of vector math using the video cards gpu. There is probably even some way you could sync the timing for multimedia stuff.

      I know nothing about CPU design though
  • by keltor (99721) <stuart&footworkmedia,com> on Sunday May 09 2004, @01:55AM (#9098542)
    The GPU are very fast ... at performing vector and matrix calculations. This is the whole point. If general computing CPUs were capable of doing vector or matrix calcs very efficiently, we would probably not have GPUs.
    • by lazy_arabica (750133) on Sunday May 09 2004, @02:50AM (#9098705) Homepage
      The GPU are very fast ... at performing vector and matrix calculations. This is the whole point. If general computing CPUs were capable of doing vector or matrix calcs very efficiently, we would probably not have GPUs.
      Yes. But 3D graphics are not the only use of these mathematical objects ; I wonder if it would be possible to use a GPU to perform video encoding or digital sound manipulation at a higher speed, as both operations require matrices. I'm also sure they could take advantage of these processors vector manipulation capabilities.
  • by 2megs (8751) on Sunday May 09 2004, @01:57AM (#9098548)
    The Pentium 4 EE actually has 178 million transistors, which puts it in between ATI's and NVIDIA's latest.

    In all of this, keep in mind that there's computing and there's computing...the kind of computing power in a GPU is excellent for doing the same numeric computation to every element of a large vector or matrix, not so much for branchy decisiony type things like walking a binary tree. You wouldn't want to run a database on something structured like a GPU (or an old vector-processing Cray), but something like a simulation of weather or molecular modeliing could be perfect for it.

    The similarities of a GPU to a vector processing system bring up an interesting possibility...could Fortran see a renaissance for writing shader programs?

    • by Knightmare (12112) on Sunday May 09 2004, @01:59AM (#9098556) Homepage
      Yes, it's true that it has that many transistors BUT, only 29 million of them are part of the core, the rest is memory. The transistor count on the video cards does not count the ram.
      • by LinuxGeek (6139) <linuxgeek@djand.cCOLAom minus caffeine> on Sunday May 09 2004, @02:27AM (#9098641)
        If they are ignoring the cache on the P4 EE, then why mention the Extreme Edition at all? Cache size is the only difference between the Xeon based EE and a regular Northwood P4. Also, modern GPU's certainly do have cache. Read this old GeForce4 preview [pcstats.com] .
        The Light Speed Memory Architecture (LMA) that was present in the GeForce3 has been upgraded as well, with it's major advancements in what nVidia calls Quad Cache. Quad Cache includes a Vertex Cache, Primitive Cache, Texture Cache and Pixel Caches. With similar functions as caches on CPU's, these are specific, they store what exactly they say.
        Another good article [digit-life.com] has a block diagram showing the cache structures of the GeForce FX GPU. Nvidia and ATI both keep quiet about the cache sizes on their GPUs, but that dosen't mean that the full transistor count is dedicated to the processing core.
      • by gunix (547717) on Sunday May 09 2004, @03:09AM (#9098748)
        Well, it's like UNIX, it's userfriendly, it's just selects it's friends very carefully.
        IMHO, the perfect friend is someone interested in maximum performance and knows how to program and knows something about computer hardware.

        Have you looked at fortran 90, 95 or 2000?
  • by Anonymous Coward on Sunday May 09 2004, @01:57AM (#9098550)
    General-purpose computation using graphics hardware has been a significant topic of study for the last few years. Pointers to a lot of papers and discussion on the subject are available at: www.gpgpu.org [gpgpu.org]
    • by Lord Prox (521892) on Sunday May 09 2004, @02:28AM (#9098645) Homepage
      BrookGPU [stanford.edu]
      from the BrookGPU website...
      As the programmability and performance of modern GPUs continues to increase, many researchers are looking to graphics hardware to solve problems previously performed on general purpose CPUs. In many cases, performing general purpose computation on graphics hardware can provide a significant advantage over implementations on traditional CPUs. However, if GPUs are to become a powerful processing resource, it is important to establish the correct abstraction of the hardware; this will encourage efficient application design as well as an optimizable interface for hardware designers.

      From what I understand this project it aimed at making an abstraction layer for GUP hardware so writing code to run on it is easier and standardsied.
  • by pyrrhonist (701154) on Sunday May 09 2004, @02:01AM (#9098562)
    What could my video card be doing for me while I am not playing the latest 3d games?

    Two words: virtual pr0n

  • Hacking the GPU (Score:5, Informative)

    by nihilogos (87025) on Sunday May 09 2004, @02:03AM (#9098572)
    Is a course being offered at caltech since last summer on using gpus for numerical work. Course page is here [caltech.edu].
  • by CherniyVolk (513591) on Sunday May 09 2004, @02:04AM (#9098576)

    "Utilize the sheer computing power of your video card!"

    New market blitz, hmmmm.

    SETI ports their code, and within five days their average completed work units increase 1000 fold. 13 hours later, they have evidence of intelligent life at 30000 locations within one degree.

    Microsoft gets the hint, and comes out with a brilliant plan to utilize GPUs to speed up their OS and add bells and whistles to their UI.

    And, once again, Apple and Quartz Extreme is ignored.
  • by Anonymous Coward on Sunday May 09 2004, @02:05AM (#9098580)
    Before you get excited just remember how asymmetric the APG bus is. Those GPUs will be at much better use when we get them as 64bit pci cards.
  • by ratboot (721595) on Sunday May 09 2004, @02:10AM (#9098588)
    What's interesting with new video cards it's their memory capacity, 128 or 256 MB and that this memory is accessible on some new cards at 900 MHz with a data path of 256 bit (which is a lot faster than a CPU with DDR 400 installed).
  • Wow (Score:5, Interesting)

    by cubicledrone (681598) on Sunday May 09 2004, @02:10AM (#9098589)
    All that processing power, and the latest games still run at about 22 frames per second, if that.

    The CPU can do six billion instructions a second, the GPU can do 18 billion, and every last cycle is being used to stuff a 40MB texture into memory faster. What a waste. Yeah, the walls are even more green and slimy. Whoop-de-fucking-do.

    Would it be great if all that processing power could be used for something other than yet-another-graphics-demo?

    Like, maybe some new and innovative gameplay?
    • Frogger (Score:5, Interesting)

      by BiggerIsBetter (682164) <richard@vem s . c o .nz> on Sunday May 09 2004, @02:52AM (#9098712) Homepage
      Some dude wrote Frogger almost entirely in pixel shaders. http://www.beyond3d.com/articles/shadercomp/result s/ [beyond3d.com] (2nd from the bottom).
    • Re:Wow (Score:5, Insightful)

      by PitaBred (632671) <slashdot&pitabred,dyndns,org> on Sunday May 09 2004, @03:23AM (#9098794) Homepage
      You don't seem to understand that GPU's are very specific purpose computing devices. They aren't like a general purpose processor like you CPU. They crunch matrices, and that's about it. Even all the programmable stuff is just putting parameters on the matrix churning.
    • by Sycraft-fu (314770) on Sunday May 09 2004, @03:42AM (#9098848)
      When I say oh shut the fuck up.

      Sorry for the flames, but seriously, I get so damn sick of all the "all new games suck" whiners. Look, there are legit reasons to want new technology. It is nice to have better graphics, more realistic sound, etc. It is NICE to have game that looks and sounds more like reality. Yes, that doesn't make the game great, but that doesn't mean it's worthless.

      What's more, don't pretend like all modern games suck while old games ruled. That's a bunch of bullshit. Sure, there are plenty of modern games that suck, but guess what? There are tons of old games that suck too. Thing is, you just tend to forget about them. You remember the greats that you enjoyed or heard about, the ones that helped shape gaming today. You forget all the utter shit that was released, just as is released today.

      So get off it. If you don't like nice graphics, fine. Stick with old games, no one is forcing you to upgrade. But don't pretend like there is no reason to want better graphics in games.
      • by Tim C (15259) on Sunday May 09 2004, @04:16AM (#9098908)
        Hear, hear.

        There's something that's always puzzled me a little about this site - attached to every single article about some new piece of PC tech - a faster processor, better graphics card, etc - there are a number of comments bemoaning the advance. All of them saying that people don't need the power/speed they have already, that they personally are just fine with 4 year old hardware, or, in this case, that better graphics don't make for better games. Hell, the same is true for mobile phones - I've lost count of the number of comments bemoaning advances in them, too.

        It's funny, but I thought this was supposed to be a site for geeks; aren't geeks supposed to *like* newer, better toys?

        To get back on topic - no, better graphics are not sufficient for a better game. However, if the gameplay is there, then they can certainly make the experience more enjoyable. Would Quake have been as much fun if it was rendered in wireframes?

        Better graphics help add to the sense of realisim, making the game a more immersive experience. The whole point of the majority of games is entertainment and (to an extent) escapism. Additionally, what a lot of people like the grand-parent poster seem to forget is that most of the big-name game engines are licensed for use in a number of games. Let people like id spend their time and money coming up with the most graphically intensive, realistic engine they can. Think Doom 3'll suck because the gameplay will be crap? Fine, then wait for someone to license the engine and create a better game with it. In the meantime, please shut up and remember that there are those of us who like things to be pretty, as well as useful/well made/fun/(good at $primaryPurpose)

        Good graphics on their own won't make a good game, but they will help make a good game great.
  • This is BIG (Score:5, Insightful)

    by macrealist (673411) on Sunday May 09 2004, @02:18AM (#9098612) Journal
    Creating a way to use the specialize GPUs for vector processing that is not graphics related is ingenious. Like a lot of great ideas, it is sooo obvious AFTER you see some one else do it.

    Don't miss the point that this is not intended for general purpose computing. Don't port OoO to the graphics chip.

    Where it is huge is in signal processing. FPGAs have begun replacing even the G4s in this area recently because of the huge gains in speed vs. power consumption an FPGA affords. However, FPGAs are not bought and used as is, and end up costing a significant amount (of development time/money) to become useful. Being able to use these commodity GPUs for vector processing creates a very desirable price/processing power/power consumption option. If I were nVIDIA or ATI, I would be shoveling these guys money to continue their work.
  • Siggraph 2003 (Score:5, Informative)

    by Adam_Trask (694692) on Sunday May 09 2004, @02:21AM (#9098626)
    Check out the publication list in Siggraph 2003. There is a whole section named "Computation on GPUs" (papers listed below). And the papers for Siggraph 2004 should be out shortly.

    If you have a matrix solver, there is no telling what you can do. And i remember, these papers show that the speed is faster than the matrix calculations of the same stuff using the CPU.

    # Linear Algebra Operators for GPU Implementation of Numerical Algorithms
    Jens Krüger, Rüdiger Westermann

    # Sparse Matrix Solvers on the GPU: Conjugate Gradients and Multigrid
    Jeff Bolz, Ian Farmer, Eitan Grinspun, Peter Schröder

    # Nonlinear Optimization Framework for Image-Based Modeling on Programmable Graphics Hardware
    Karl E. Hillesland, Sergey Molinov, Radek Grzeszczuk

  • by aancsiid (135857) on Sunday May 09 2004, @02:21AM (#9098628) Homepage
    http://www.gpgpu.org/ [gpgpu.org] is a great resource for general purpose graphics processor usage.
  • Imagine... (Score:4, Interesting)

    by rokzy (687636) on Sunday May 09 2004, @02:32AM (#9098661)
    a beowulf cluster of them.

    seriously, we have a 16 node beowulf cluster and each node has an unnecessarily good graphics card in them. a lot of the calculations are matrix-based e.g. several variables each 1xthousands (1D) or hundredsxhundreds (2D).

    how feasible and worthwhile do you think it would be to tap into the extra processing power?
  • Pseudo repost (Score:4, Informative)

    by grape jelly (193168) on Sunday May 09 2004, @02:42AM (#9098682)
    I thought this looked familiar:

    http://developers.slashdot.org/developers/03/12/21 /169200.shtml?tid=152&tid=185 [slashdot.org]

    At least, I would imagine most of the comments would be the same or similar....
  • Finally (Score:5, Funny)

    by Pan T. Hose (707794) on Sunday May 09 2004, @02:45AM (#9098693) Homepage Journal

    Using GPUs For General-Purpose Computing

    I'm glad that finally they started to use the General-Purpose Unit. What took them so long?

  • Bass Ackwards? (Score:5, Insightful)

    by Anonymous Coward on Sunday May 09 2004, @03:01AM (#9098725)
    Perhaps offloading the CPU to the GPU is the wrong way to look at things? With the apparently imminent arrival of commodity (low power) multi-CPU chips [slashdot.org], maybe we should be considering what we need to add to perform graphics more efficiently (ala MMX et al)?

    While it's true that general purpose hardware will never perform as well as or as efficiently as a design specifically targeted to the task (or at least it better not), it is also equally as true that eventually general purpose/commodity hardware will achieve a price-performance point where it is more than "good enough" for majority.
  • GPU = (Score:5, Funny)

    by greppling (601175) on Sunday May 09 2004, @03:29AM (#9098815)
    Now I finally understand that acronym: General purpose unit!
  • by nothings (597917) on Sunday May 09 2004, @03:42AM (#9098843) Homepage
    Transistor counts keep growing, so I keep updating this and reposting it about once a year.

    486 : 1.2 million transistors
    Pentium : 3 million transistors
    Pentium Pro : 5.5 million transistors
    Pentium 2 : 7.5 million transistors
    Nvidia TNT2 : 9 million transistors
    Alpha 21164 : 9.3 million (1994)
    Alpha 21264 : 15.2 million (1998)
    Geforce 256 : 23 million transistors
    Pentium 3 : 28 million transistors
    Pentium 4 : 42 million transistors
    P4 Northwood : 55 million transistors
    GeForce 3 : 57 million transistors
    GeForce 4 : 63 million transistors
    Radeon 9700 : 110 million transistors
    GeForce FX : 125 million transistors
    P4 Prescott : 125 million transistors
    Radeon X800 : 160 million transistors
    P4 EE : 178 million transistors
    GeForce 6800 : 220 million transistors
    here's the non-sucky version [nothings.org] since <ecode> doesn't actually preserve spacing like <pre>.
  • Dual Core (Score:5, Interesting)

    by BrookHarty (9119) on Sunday May 09 2004, @04:16AM (#9098907) Homepage Journal
    With Dual Core CPU's going to be the norm, why not a Dual Core GPU for even faster gfx cards? With everyone wanting 16x antialiasing at 1600x1200 to get over 100fps, its gonna take some very powerful GPU's (or some dual cores).

    Even with the ATI 800XT, 1600x1200 can dip below 30FPS with AA/AF on higher settings. Still a ways to go for that full virtual reality look.
  • Commodore 64 (Score:5, Interesting)

    by curator_thew (778098) on Sunday May 09 2004, @05:01AM (#9098995)

    This concept was being used back in 1988. The Commodore 64 (1mhz 6510, a 6502 like micro processor) had a peripheral 5.25 disk drive called the 1541, which itself had a 1mhz 6510 cpu in it, connected via. a serial link.

    It became common practice to introduce fast loaders: these were partially resident in the C64, and also in the 1541: effectively replacing the 1541's limited firmware.

    However, demo programmers figured out how to utilise the 1541: one particular demo involved uploading program to the 1541 at start, then upon ever screen rewrite, uploading vectors to the 1541, which the 1541 would perform calculations in parallel with the C64, then at the end of the screen, the C64 fetch the results from the 1541, and incorporate them into the next screen frame.

    Equally, GPU provides similar capability if so used.

    • Re:Not the Point (Score:4, Interesting)

      by JonoPlop (626887) <me@NosPAM.JonathonMah.com> on Sunday May 09 2004, @01:59AM (#9098554) Homepage
      The whole point of graphic cards is that they have a dedicated purpose. Using the cards for anything that is general purpose is like using a motorcycle to tow a pop-up camper.

      No, it's like using your pop-up camper for storage space when you're using it on holidays.

    • Re:Not the Point (Score:4, Insightful)

      by Amiga Lover (708890) on Sunday May 09 2004, @02:08AM (#9098585)
      The whole point of graphic cards is that they have a dedicated purpose. Using the cards for anything that is general purpose is like using a motorcycle to tow a pop-up camper.


      What's relevant is that to the processor on a graphics card, its dedicated purpose is simply a bunch of logic. There's no dedicated "this must be used for pixels only, all else is waste" logic inherent in the system. there are MANY purposes for which the same/similar logic that applies in generating 3D imagery can be used, and that seems the purpose of this paper. Run THOSE type operations on the GPU. Some things they won't be able to do well no doubt - but those they can, they can do extremely well.

    • Not so... (Score:4, Interesting)

      by oboylet (660310) on Sunday May 09 2004, @02:27AM (#9098642)
      High-powered GPUs can make for really good general-purpose devices.

      Apple's Newton had no CPU, only a GPU that was more than adequate.

      Ideas like these are good in general. I'd like to see the industry move away from the CPU-as-chief status quo. Amigas were years ahead of their time in large part because the emphasis wasn't as much on central processing. The CPU did only what it was supposed to do -- hand out instructions to the gfx and audio subsystems.

      Hardly using a "motorcycle to tow a pop-up camper." If anything, the conventional wisdom is, "when all you have is a hammer, everything looks like a nail."

    • by kfg (145172) on Sunday May 09 2004, @02:48AM (#9098703)
      Dude, you obviously have never tried to sleep in a motorcycle.

      KFG
    • here ya go (Score:4, Informative)

      by dave1g (680091) on Sunday May 09 2004, @02:22AM (#9098630) Journal
      some one else posted this...

      www.gpgpu.org [gpgpu.org]

      Website on this topic (Score:0)
      by Anonymous Coward on Sunday May 09, @01:57AM (#9098550)
      General-purpose computation using graphics hardware has been a significant topic of study for the last few years. Pointers to a lot of papers and discussion on the subject are available at: www.gpgpu.org [gpgpu.org]
    • by PitaBred (632671) <slashdot&pitabred,dyndns,org> on Sunday May 09 2004, @03:37AM (#9098829) Homepage
      Lemme try to help:
      a) Not equal. Apples and oranges. A GPU will do repeated calculations very, very fast, like matrix transforms and the like. A CPU on the other hand will make decisions based on input, rather than just crunching numbers
      b) The main display (the GUI) already uses many tricks on the graphics card. The hard part is making sure that all graphics cards support the features. Things like the xrender extension and such are becoming more common as graphics cards and drivers get "standard" capabilities
      c) Your imagination is the limit as to what it could be used for. Just realize that it's a good data processing unit, not a good program execution unit. Use each for their strengths.
      d) Modified? With new cards/drivers, all it takes is OpenGL calls to start taking advantage of this power. All it really takes is someone who knows what they're doing and has a bit of inspiration.
    • by BlueJay465 (216717) on Sunday May 09 2004, @03:37AM (#9098831)
      Well they already make DSP cards for audio processing. Simply do a google(TM) search for "DSP card" and you will get [uaudio.com] several [tcelectronic.com] vendors. [digidesign.com]

      I can't imagine it would take a whole lot to hack them for just their processing power outside of audio applications.
    • by pe1chl (90186) on Sunday May 09 2004, @04:11AM (#9098898)
      What I remember about co-processing cards and "intelligent peripheral cards" (like raid controllers or network cards with an onboard processor) is this:

      There is a certain overhead because a communications protocol is to be established between the main processor and the co-processor. For simple tasks the main processor often stops and waits for the co-processor to complete the task and retrieves the results. For more complicated tasks, the main processor continues but later an interrupt occurs that the main processor must service.

      You must be very careful or the extra overhead of this communication makes the execution of the task slower than without the co-processor. This is certainly going to happen at some time in the future, when you increase central processor power all the time but keep using the same co-processor.

      For example, your matrix co-processor needs to be fed the matrix data, start working, and tell it is finished. Your performance would not only be limited by the processor speed, but also by the bus transfer rate, and by the impact those fast bus transfers have on the CPU-memory bandwidth available and the on-CPU cache validity.
      When you are unlucky, the next CPU you buy is faster in performing the task itself.