Slashdot Mirror


High performance FFT on GPUs

A reader writes: "The UNC GAMMA group has recently released a high performance FFT library which can handle large 1-D FFTs. According to their webpage, the FFT library is able to achieve 4x higher computational performance on a $500 NVIDIA 7900 GPU than optimized Intel Math Kernel FFT routines running on high-end Intel and AMD CPUs costing $1500-$2000. The library is supported for both Linux and Windows platforms and is tested to work on many programmable GPUs. There is also a link to download the library freely for non-commerical use."

70 of 274 comments (clear)

  1. Final Fantasy Tactics? by Musteval · · Score: 4, Funny

    Why use a GPU for Final Fantasy Tactics? Couldn't you just use the GBA?

    --
    Note to mods: I'm probably being sarcastic.
    1. Re:Final Fantasy Tactics? by numbski · · Score: 4, Funny

      Seriously! I mean, with only 1-D, it's really going to suck. I know people have accused Final Fantasy of being too linear in the past, but this is getting a bit silly...now, we're stuck at a single point!

      --

      Karma: Chameleon (mostly due to the fact that you come and go).

    2. Re:Final Fantasy Tactics? by fireman+sam · · Score: 2, Funny

      Ah, but great framerate.

      --
      it is only after a long journey that you know the strength of the horse.
  2. It's nice... by non0score · · Score: 4, Informative

    if you're only considering 32-bit floating point numbers and don't need full IEEE-754 compliance.

    1. Re:It's nice... by john.r.strohm · · Score: 4, Interesting

      Depending on what you're doing, for an FFT, you probably don't need 64-bit floating point, and you DON'T need full IEEE-754 compliance.

      If you are taking data off of some kind of sensor, there are damned few sensors with 24 good bits of data out of the noise floor. Radars work just fine with 16-bit A/D converters.

      IEEE-754 compliance helps you in the ill-defined corners of the number space. FFTs inherently work in the well-behaved arena of simple trig functions and three-function (add/subtract/multiply) math.

      I'm currently doing FFTs with 16-bit fractional arithmetic in Blackfin DSP. For what I'm doing with the results, it is good enough.

      Not to mention you could use a "GPU farm" to do a fast search, and take any "interesting" data regions and feed those to a 64-bit, fully-IEEE-754 compliant, slow-as-molasses-in-January x86 FFT.

      Eventually, with some more articles like this one and yesterday's Cell piece, people will start to figure out that the x86 architecture is brain-dead and needs to be put out of its misery.

    2. Re:It's nice... by stephentyrone · · Score: 4, Informative
      FFTs inherently work in the well-behaved arena of simple trig functions and three-function (add/subtract/multiply) math.
      add/subtract/multiply math is the area that 754 has had the biggest effect on - in fact, the spec has very little to say about transcendental functions, but is almost entirely concerned with the basic arithmetic ops. prior to 754, floating point was, in general, not algebraicly closed under +-*/, nor were the results correctly rounded.

      most highly parallel GPU-type chips lack support for gradual underflow, for example, one of those "ill-defined corners of the number space" where 754 has been a tremendous boon. flush-to-zero is fine if you're decoding MP3s or unpacking texture maps, but it causes a lot of problems when you start trying to do more general scientific computations. sometimes those low order bits matter a whole lot; sometimes they're the difference between getting an answer accurate to 4 digits and an answer with *no* correct digits.

      "simple trig functions" have their own problems on these architectures; try writing an acceptable range-reduction algorithm for sin or cos without having correctly rounded arithmetic ops. sin and cos are, in fact, two the hardest operations in the math lib on which to get acceptable accuracy.

      admittedly, none of these objections are an issue with FFTs. but the reason that FFTs will perform acceptably on such an architecture is that the operations are (usually) constrained to the domain in which you don't encounter the problems i mention, not because the operations themselves are inherently safe. the lack of support for gradual underflow will cause you to lose many, many bits in frequency components that have nearly zero magnitude, but you usually don't care about those components when you're doing FFTs, anyway.

    3. Re:It's nice... by edp · · Score: 3, Insightful
      "If you are taking data off of some kind of sensor, there are damned few sensors with 24 good bits of data out of the noise floor. Radars work just fine with 16-bit A/D converters."

      Take a look at their benchmarks. The chart goes up to eight million elements. The accumulated rounding error in FFT outputs may be around n * log2(n) ULP, where n is the number of elements, and ULP (units in last place) is relative to the largest input element. (Caveats: That is the maximum; the distribution of the logs of the errors resembles a normal distribution. Input was numbers selected from a uniform distribution over [0, 1). The error varies slightly depending on whether you have fused multiply-add and other factors.)

      So with eight million elements, the error may be 184 million ULP, or over 27 bits. With only 24 bits in your floating-point format, that is a problem. Whether you had 24-bit or 1-bit data to start with, it is essentially gone in some output elements. Most errors are less than the maximum, but it seems there is a lot of noise and not so much signal.

      It may be that the most interesting output elements are the ones with the highest magnitude. (The FFT is used to find the dominant frequencies in a signal.) If so, those output elements may be large relative to the error, so there could be useful results. However, anybody using such a large FFT with single-precision floating-point should analyze the error in their application.

    4. Re:It's nice... by Waffle+Iron · · Score: 5, Informative
      Eventually, with some more articles like this one and yesterday's Cell piece, people will start to figure out that the x86 architecture is brain-dead and needs to be put out of its misery.

      Why? Because the x86 isn't a DSP?

      The x86 is a general-purpose CPU. It isn't brain dead; historically it's almost always been at least half as fast as the latest expensive processor fad du jour, and sometimes it has actually been the fastest available general purpose processor. As these fads have come and gone, the x86 has quietly kept improving by incorporating many of their best ideas.

      The cell processor is basically a POWER processor core packaged with a few DSPs tacked onto the die. That sounds like a kludge to me, but if it turns out to be a success, there's nothing stopping people from tacking DSPs onto an x86 die.

      All a DSP is good at is fast number crunching. It usually has little in the way of an MMU, along with a memory architecture tuned mainly for vector-like operations, branch prediction tuned only for matrix math, etc. DSPs would make a bad choice for running general purpose programs, especially with cache and branch issues becoming the dominant performance bottleneck in recent times. DSPs would a horrible choice for running an OS with any kind of security enforcement. Using a GPU as a poor-man's DSP is interesting, but it suffers even more from these same limitations. If DSPs really offered a better solution for general-purpose problems, they would have replaced other CPU architectures decades ago.

    5. Re:It's nice... by SETIGuy · · Score: 2, Interesting
      If you are taking data off of some kind of sensor, there are damned few sensors with 24 good bits of data out of the noise floor. Radars work just fine with 16-bit A/D converters.

      I think you are confusing the precision of the input data with the precision of the power spectrum. An FFTs do a scaled add of a large number of samples, so the precision in the output is dependent on the number of input samples.

      For example SETI@home uses 1 bit complex sampling. (Yes, the SETI@home ADCs are a pair of high speed comparators.) That doesn't limit the results to 1 bit. It does reduce the sensitivity by 1.5dB (which, unfortunately isn't worth doubling our bandwidth or the number of tape we have to buy). The maximum precision you can get out of that in a 128K FFT (in the low SNR limit) is about 18 bits/channel or 54dB of dynamic range in the power spectrum. That's more than enough for SETI@home where our thresholds are at about 14dB. Changing that to a true 16bit ADC would give you 34 bits or 102dB at the expense of creating 16X as much data.

      Of course depending upon the sampling rate and the duration of the signal you are looking for you may need the 16 bits. If you are looking over 8 samples you only get 4bits or 12dB for SETI@home, 20bits or 60dB for a 16bit ADC.

    6. Re:It's nice... by Henry+V+.009 · · Score: 2, Funny

      Yeah! If you offload your FFTs to your GPU, the system resources on your monster work box are now freed enough up to let you play Quake while you're supposed to be calculat...oh, damn.

  3. Re:Uhh.. by Anonymous Coward · · Score: 5, Informative
  4. Rush hour math. by Anonymous Coward · · Score: 3, Insightful

    ""The UNC GAMMA group has recently released a high performance FFT library which can handle large 1-D FFTs. According to their webpage, the FFT library is able to achieve 4x higher computational performance on a $500 NVIDIA 7900 GPU than optimized Intel Math Kernel FFT routines running on high-end Intel and AMD CPUs costing $1500-$2000. "

    GPUs are nice, but there's the little matter of getting data and results on and off the chip.

    1. Re:Rush hour math. by corvair2k1 · · Score: 4, Informative

      Typically, when doing these measurements, the GAMMA group counts the upload/download time as part of the computation time. So, the 4x-5x speedup you're seeing is end to end, with results starting and ending in main memory.

  5. FFTs in GPUs, eh? by Anonymous Coward · · Score: 3, Funny

    Well, seeing as how the V.P. is such a V.I.P., shouldn't we keep the P.C. on the Q.T.? 'Cause if it leaks to the V.C. he could end up M.I.A., and then we'd all be put out in K.P.

  6. Any 64 bit GPU's? by ufnoise · · Score: 2, Insightful

    While interesting, I need IEEE 64 bit double precision for my scientific applications. Are there any 64-bit floating point GPU's out there?

    1. Re:Any 64 bit GPU's? by Surt · · Score: 3, Interesting

      Not yet. But in the next or second generation out your wish will be fulfilled (more and more game developers are pushing for 64 bit color accuracy, which will necessitate a transition to fully 64bit GPUs in the not distant future).

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    2. Re:Any 64 bit GPU's? by Fordiman · · Score: 2, Informative

      No.

      Implementing 'big numbers', or numbers larger than the proccessor's spec, is actually quite computationally heavy when compared to the operations you're replacing. As such, a 4x increase in the speed of computation can translate to a (to pull a number from my arse) 0.25x loss of performance when dealing with larger floats.

      However...

      With CPU/GPU cooperation, the floating gap can be handled by using the CPU to generate a lookup table of high-precision trig as, say, a texture, and treating the numbers as mere pointers to an array. Addition is a relatively light bignum math, and with the FFT, you could implement the addition and lookup math quite speedily on the GPU side.

      Of course, from reading in, I'm pretty sure that's what's in-process for higher precision.

      --
      110100 1101000 1101000 1100110 0 1101111 1101000 1100011 1
    3. Re:Any 64 bit GPU's? by TheRaven64 · · Score: 4, Interesting
      more and more game developers are pushing for 64 bit color accuracy, which will necessitate a transition to fully 64bit GPUs in the not distant future

      Current generation GPUs handle 64bit and 128bit colours already. A 64-bit colour value is just four channels of 16-bit floats (halfs in Cg parlance). A 128-bit colour value is a vector of four 32-bit colour values.

      If game developers wanted 256-bit colour, then GPUs would need to support 64-bit floating point arithmetic. This is unlikely to happen, however, since 64-bit colour (which is really 48-bit colour with a 16-bit alpha channel) gives more colours than the human eye can distinguish. In fact, even with 64- or 128-bit colour for the intermediate results, current cards only have a 10-bit DAC for converting the colour value to an analogue quantity that can be displayed on an analogue screen.

      It is worth noting that Pixar's RenderMan software doesn't use more than 128-bit colour, and films like Toy Story were rendered using 64-bit mode.

      --
      I am TheRaven on Soylent News
    4. Re:Any 64 bit GPU's? by Surt · · Score: 3, Informative

      It's at the pixel shader level that you run into low color rendition on current GPUs, and also where the people doing math on GPU are doing their work. That's where the move to 64 bit will likely happen soon, and will conveniently help the math people as a side effect.

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    5. Re:Any 64 bit GPU's? by jthill · · Score: 2, Informative

      Yes. Some guys at LBNL took good look. /. had the story yesterday. When they were trying, they repeatedly toasted Cray's best. With a "naive" FFT implementation -- not half trying -- they got 80%.

      --
      As always, all IMO. Insert "I think" everywhere grammatically possible.
    6. Re:Any 64 bit GPU's? by UncleFluffy · · Score: 2, Insightful

      While interesting, I need IEEE 64 bit double precision for my scientific applications.

      Depends on what you need 64 bit for - is it for the precision (i.e. mantissa size) or the range (i.e. exponent size)?

      If you can live with a double-precision mantissa but a single-precision exponent, it's possible to get that using single-precision building blocks with less than a 2x slowdown. Sorry, don't have the references to hand right now, but a dig around on Citeseer/Google should get you there.

      --

      What would Lemmy do?

  7. FFT; by MrShaggy · · Score: 2, Informative

    FFT; Fast Fourier Transform - a specific algorithm, but used to indicate any algorithm attempting to determine the power versus frequency graph for a signal Dag-nadit

    --
    I have mod points and I am not afraid to use them.
  8. You don't need a translation... by nick_davison · · Score: 2, Insightful

    FFT:

    Some calculation which can be heavily optimized to simple but fast processing. Hence a [relatively] cheap part that does a few simple tasks very fast can out perform a more expensive part that can do a vastly greater range of tasks with more efficiency across that general range but less in a specific area when performing that optimized calculation.

    By capitalizing on this incredibly basic rule of computer science (the an optimized simple thing going fast is faster than a more powerful general thing that is only being used for one of its many potentials), attention grabbing headlines can be garnered.

  9. FFT=Fast Fourier Transforms by amliebsch · · Score: 4, Interesting

    Isn't that what SETI@home uses for the bulk of its signal analysis? Would be kind of neat to leverage the millions of idle GPU's out there.

    --
    If you don't know where you are going, you will wind up somewhere else.
    1. Re:FFT=Fast Fourier Transforms by fredrikj · · Score: 2, Informative

      It's also used by distributed mathematics projects such as GIMPS to multiply large numbers. Unfortunately, if this implementation only operates in 32-bit precision, it will probably be less useful for this purpose since you'd have to do subproducts with fewer digits at a time, to avoid rounding error. I'm not familiar with the details, though.

  10. This is news? by Anonymous Coward · · Score: 2, Interesting

    I have an uncle who's a professor who's been using GPUs for scientific computation for years. Apparently he has systems with four GPUs running simulations.

    1. Re:This is news? by Fex303 · · Score: 4, Funny
      I have an uncle who's a professor who's been using GPUs for scientific computation for years.

      I'm sorry, but playing Quake at really high framerates does not count as research. He's not fooling anyone.

      The business cards which list him as 'Profess0r of Pwnage' probably aren't helping either.

      It's also bad when he refers to the undergrads as 'n00bs' during his lectures to them.

  11. Re:Please by __aaclcg7560 · · Score: 2, Funny

    One more reason to buy an overpriced video card instead of an overpriced CPU?

  12. Re:Math library for sale? by Improv · · Score: 2, Insightful

    I don't know if it's exactly newsworthy, but it's kind of cute (and interesting) that the amount of specialisation that's going on in graphics cards leads to situations where one can persuade the graphics card to do one's (not graphics-related) work faster than one would be using the general purpose CPU for the same task. It's more amusement than anything else (although for those who want to do the computation, it's also useful).

    --
    For every problem, there is at least one solution that is simple, neat, and wrong.
  13. $1500-$2000? by Wesley+Felter · · Score: 3, Insightful

    I sense a little bias here; the fastest Intel and AMD processors are actually $1,000.

    1. Re:$1500-$2000? by veg_all · · Score: 4, Informative

      RTFA? Or just look at the pretty diagrams.
      They're running against dual-processor systems (Opteron and Xeon).

      --
      grammar-lesson free since 1999. (rescinded - 2005)
    2. Re:$1500-$2000? by MP3Chuck · · Score: 2, Informative

      Pricegrabber lists some up in the range of several thousand dollars ... like this Itanium, for just over $5k and this Dual Core Xeon for $3,700.

  14. Re:Uhh.. by SpinyNorman · · Score: 2, Informative

    There's a somewhat non-obvious mathematical result that any continuous periodic function can be decomposed as the sum of a series of sine functions of different frequencies. This series of sine waves is referred to as the fourier series of the function. The FFT (fast fourier transform) is an efficient numeric algorithm to derive the coefficients of the fourier series for any function.

    One useful way to think of the FFT is as transform of signal data from the time domain (raw samples) to the frequency domain (the constituent sine waves). This is useful for all sorts of purposes such as being the first step in speech recognition, the basis of JPEG/MPEG compression, ...

  15. Re:Math library for sale? by Kortec · · Score: 2, Informative

    This is probably making a lot of developers, myself included, very very happy people. FFT's are where the proverbial magic happens for a lot of signals and systems analysis, as well as for the multiplication of very large integers. So anyone involved in gaming that includes digital signal processing (voice chat in UT, karaoke-karaoke-revolution type games, analog user input, etc.) is going to be happy, and anyone who's involved in multiplying huge integers (crypto anyone?) may very well have wet themselves.

    If this is true, to be able to make the same computations in a fourth of the time is a pretty nice thing, and using a little more of a GPU is likely to be acceptable in a decent number of applications.

    --
    "My heart is in the work." - Andrew Carnegie
  16. Cray-1 comparison by Mostly+a+lurker · · Score: 5, Interesting
    The Cray-1A supercomputer, weighing in at 5.5 tons, had an absolute maximum peak performance of 250 megaflops. It, of course, cost millions and the power requirements (including for cooling) were in excess of 200 kW. I remember marveling at the advanced nature of this technological achievement.

    Thirty years later, a $500 GPU, weighing less than 1 pound, can produce 6 gigaflops. People complain about its power and cooling needs, but they are rather below 200 kW! We sometimes forget just how amazing the developments in computing have been over the last three decades.

    1. Re:Cray-1 comparison by Anonymous Coward · · Score: 2, Insightful

      People complain because they compare the power consumption to their old "home computer". Just look at the Apple II, the C64 or similar 8 bit computers, almost all of which had such low power demands that they could run without fans. Even the "IBM compatible" PCs up to and including 386s almost always had exacly one fan, the one in the power supply. My most recently purchase (second hand) computer has 6 fans, and draws enough power to justify most of them.

      You can probably make up your own flawed car analogy and compare top speed and fuel consumption of today's compact cars with the racing cars of 60 years ago.

    2. Re:Cray-1 comparison by suv4x4 · · Score: 2, Funny

      People complain about its power and cooling needs, but they are rather below 200 kW! We sometimes forget just how amazing the developments in computing have been over the last three decades.

      Why compare it with Cray-1, compare it with the steam-powered calculators of the past that take minutes to multiply two simple numbers and the results are sometimes kinda off.

      People always demand more, this is why they develop more, so to get more. If people become suddenly satisfied with whatever state they're in, they'll never move on.

  17. Re:Uhh.. by Fordiman · · Score: 5, Informative

    an FFT is a transform that turns a signal (like an audio file) into its frequency components (like a spectrograph). It's used for MP3 compression, sound EQs, jpeg compression, mpeg4 compression, and a number of other things (I use FFTW for tuning my guitar).

    FFTW is the 'Fastest Fourier Transform in the West', a cute name for the work of a number of graduate students who use several techniques to turn the FFT from 'Numerical Recipes in C' into a freaking speed daemon.

    GPUFFTW is much the same thing, but ported to your video card's GPU - which is generally more optimized for doing the 'apply a floating point matrix to an array' thing - thus speedin the FFTW up even more while relieving the main processor from doing the work.

    If you don't have a high-powered video card, this means nothing for you. If you do, it means the above operations (compression, spectrum analysis, etc) can be done faster and without eating up processes.

    --
    110100 1101000 1101000 1100110 0 1101111 1101000 1100011 1
  18. That's where PCIe is useful by WoTG · · Score: 3, Informative

    AGP was not very useful for bidirectional data flow, but PCIe is. GPU's are pretty sophisticated these days, so they've got the logic to handle moving stuff in and out of it's memory and over the bus to the CPU and the rest of the system.

  19. Re:Uhh.. by kabz · · Score: 3, Interesting

    Or in the form of a concrete example ... The little spectrum analysers in iTunes are a good example of taking some time domain data, analysing it, and displaying the low through high frequencies.

    As an example of how far we've come, I implemented the Cooley-Tukey FFT in assembler on an Amiga, and it was just barely out of real-time. You had to capture some audio data, then wait while it was analysed. Nowadays, you can write the same thing in Objective-C on a G4, using the standard audio capture library, and have the FFT's computed between redraw events.

    --
    -- "It's not stalking if you're married!" My Wife.
  20. Precision limit. by DrYak · · Score: 2, Informative

    The limit is the floating-point precision of the GPU.

    Most GPU can do max up to 32-bit floating point operations (depending on the brand and the model), where as most scientific applications use 64-bit and higher (the old FP unit could do 80bit FP math, SSE registers in recent processors can do 128-bits FP math).

    So some user will be happy, like for sound processing (GPU have already been used to process reverberation to create realistic sound environnement - too lazy to do the search for the slashdot reference)
    But other application (cryptography maybe) will probably need more FP precision.

    Not to mention that most scientific applications run mostly under *nix like Linux or BSD, for which GFX driver support isn't always incredible, specially for recent models, (website mentions performance hit).
    (And also remember that soon Vista will have an interface that'll completly clog the GPU and leave less free cycles to do general purpose calculation).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  21. Re:Uhh.. by exp(pi*sqrt(163)) · · Score: 4, Funny

    FFT is a data compression and encryption standard used by a wide variety of extraterrestrial civilizations. Seti@home spends most of its time running FFT code to look for signals. If we managed to communicate with any of these aliens we could ask them what it stands for.

    --
    Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
  22. (Almost) Comparison to BSD Licensed version by achooo · · Score: 2, Interesting

    on this page here they almost compare to a program called libgpufft (which is an open source BSD version of the same library here ) I wonder how they do compared to the BSD licensed version---

  23. Interesting question... by DrYak · · Score: 2, Interesting

    The interesting question will be :
    Is the 32-bit precision enough for SETI@Home application ?
    Or does the project needs the higher precisions (64bit to 128bit) that can (for now) only be provided by the CPU ?

    IMHO, maybe this could be useful. They're trying to find which chunk contains candidate data. If there's some fast low-precision algorithm that can quickly mark chunks as interesting / recheck with higher precision / un-interesting, it'll be helpful to quickly tell appart interseting chunk, even if data need to be post-processed later at higher precision.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Interesting question... by SETIGuy · · Score: 4, Informative
      Yes, 32 bits is quite enough for our FFTs. Our requirements are fairly low. 16bit floats may even do the job (although I've never tried 16bit floats in SETI@home). What has concerned us in the past is that bandwidth to GPUs was fairly assymmetric (on AGP cards), the seti@home working sets (A few buffers of 1M complex samples == 16MB each) were larger than the usable memory on many video cards and the length of the maximum shader routine was fairly small. SETI@home does quite a bit more than FFTs, so moves into and out of main memory were required. At the time we couldn't put more into the shader language. That may have changed, but right now we lack anyone who both has the time to do the job and is capable of doing it.

      Our tests on nVidia 5600 series AGP cards (this was several years ago) showed that the net SETI@home throughput using the GPU was at best 1/5 of what we could obtain with the CPU. This was primarily due to transfers out of graphics memory and into main memory.

      PCI Express allows for symmetric bandwidth to graphics memory and graphics memories are now typically larger than the size of our working set. The difficulty will be in benchmarking to see which is faster for a specific GPU/CPU combination.

      At any rate it's a fairly simple job to swap FFT routines in SETI@home. The source is available. Someone may have done it by now...

  24. Bytes/bits? by 4D6963 · · Score: 2, Informative
    From the site :

    The Video RAM will determine the maximum array length that can be sorted on the GPU. A rough guideline for performing FFT on 32-bit floats is: Maximum array length in millions = Video RAM in MB / 32

    Max array length equals video RAM in megabytes divided by 32... bits? Correct me if i'm dumb but shouldn't it rather be "Video RAM in MB / 4"?

    --
    You just got troll'd!
  25. No surprise here... by nitrocloud · · Score: 2, Insightful

    Graphics Processing Units have always been better for FFTs and signal processing than general CPUs. I've read a journal article where machine vision was implemented on a GeForce 5200 at a 3x speedup over an AMD Athlon 3200+. The reason? This is what a GPU is made for; the small dedicated instruction set makes a GPU much more adept at signal processing than the 686's have ever been.

    --
    Karma: Good, or bust!
  26. What's an FFT by Geoffreyerffoeg · · Score: 5, Informative

    Apparently nobody knows what an FFT is. Here's the best description I can give without descending into math too much.

    The Fast Fourier Transform is an algorithm to turn a set of data (as amplitude vs. time) into a set of waves (as amplitude vs. frequency). Say that I have a recording of a piano playing an A at 440 Hz. If I plot the actual data that the sound card records, it'll come out something like this picture. There's a large fading-out, then the 440 Hz wave, then a couple of overtones at multiples of 440 Hz. The Fourier series will have a strong spike at 440 Hz, then smaller spikes at higher frequencies: something like this plot. (Of course, that's not at 440, but you get the idea.)

    The reason we like Fourier transforms is that once you have that second plot, it's extremely easy to tell what the frequency of the wave is, for example - just look for the biggest spike. It's a much more efficient way to store musical data, and it allows for, e.g., pitch transformations (compute the FFT, add your pitch change to the result, and compute the inverse FFT which uses almost the same formula). It's good for data compression because it can tell us which frequencies are important and which are imperceptible - and it's much smaller to say "Play 440 Hz, plus half an 880 Hz, plus..." than to specify each height at each sampling interval.

    The FFT is a very mathematics-heavy algorithm, which makes it well suited for a GPU (a math-oriented device, because it performs a lot of vector and floating-point calculations for graphics rendering) as opposed to a general-purpose CPU (which is more suited for data transfer and processing, memory access, logic structures, integer calculations, etc.) We're starting to see a lot of use of the GPU as the modern equivalent of the old math coprocessor.

    If you're looking for more information, Wikipedia's FFT article is a good technical description of the algorithm itself. This article has some good diagrams and examples, but his explanation is a little non-traditional.

    1. Re:What's an FFT by Yenshee · · Score: 2, Informative
      Great summary, but you are describing a general Fourier Transform, not necessarily a *fast* FT. FFT refers to a specific divide and conquer algorithm that has O(n*lg(n)) time complexity, rather than the O(n^2) time complexity of the naive FT algorithm. Here n is the number of discrete samples, i.e. the size of the problem.

      FFT is to naive FT as quicksort is to insertion sort. Both quicksort and the FFT are considered to be among the top ten algorithms of the 20th century.

    2. Re:What's an FFT by fredrikj · · Score: 2, Informative

      FFT is to naive FT as quicksort is to insertion sort.

      Be careful with the terminology; you correctly referred to "naive FT algorithm" above, but this sentence might give the impression that the Fourier transform itself is an algorithm. FT is a function whereas the FFT is an algorithm that computes the function. It would be more appropriate to say that FFT is to the Fourier transform what quicksort is to sorting.

  27. Great for audio! by radarsat1 · · Score: 2, Insightful

    Awesome, this is really good news for audio people.
    I want to see how I can take advantage of this... I hope the license isn't too restrictive.
    It might be a good example of how to use the GPU for general purpose (vector-based) computation, something I've been wanting to explore.

    Just curious, how does the use of the GPU for this kind of thing affect the graphics display?
    Are you unable to draw on the screen while it's running, or something?

    1. Re:Great for audio! by CalcWiz · · Score: 2, Informative

      Generally you will only notice a difference if you are running another GPU intensive program at the same time. Most GPGPU programs (including ones made by Gamma) use extensions such as the frame buffer object so that you don't need to see the mathematical garbage in a graphical sense. Thus the only side effect is that it needs a significant amount of video memory and GPU processing time, both of which will be shared with other programs trying to use them. So if you try to compute the FFT of something that barely fits in video memory while playing UT 2004 at 1600x1200 resolution, you might have a problem. Otherwise, you probably won't notice.

      --
      If PRO- is the opposite of CON-, What's the opposite of Progress?
  28. Cryptography? by Nicolas+MONNET · · Score: 2, Insightful

    Crypto = Number theory = integer math.

    No need for floating point.

  29. Finally.... by Comboman · · Score: 4, Funny

    Finally I have a good excuse to give the IT department why I need to upgrade my video card. I need to do FFTs faster (it has nothing at all to do with Doom3).

    --
    Support Right To Repair Legislation.
  30. Re:If you need gigaflops... by zeldor · · Score: 2, Informative

    not so custom really if you go with the right integrator.
    SRC computers puts out FPGA based systems that has a nice
    32bit floating point fft library already in their development
    environment. Most customers using the fft are for radar image
    processing where the best PC solution is 50 times slower
    then the fpga based solution. Think UAVs with smart
    tracking off their radar.
    http://www.srccomputers.com/

    --
    If I could walk that way I wouldnt need cologne.
  31. Unfair comparison by daveisfera · · Score: 2, Interesting

    The one thing that I haven't seen mentioned is that the benchmarks only show "compute timings" and not actual setup and retreval times. If the benchmarks showed the amount of time to get the data to the GPU and especially the time to get the result back to a place where a program could actually use it then it would be blown out of the water by the CPU. Future cards/drivers could speed up the process of retrieving the data, but for now there will always be lame benchmarks like this that are unfairly biased toward the GPU and only tell half the story. I mean what's the point of doing an FFT so quickly if it takes forever to actually be able to get to the data.

  32. 8xx verses 2xx by Somegeek · · Score: 2, Informative

    Note that you can only use the 2xx Opterons in 1 or 2 CPU (2 or 4 core) motherboards. If you want to have 4 CPUs with 8 cores you need to use the 8 series Opterons. The Opteron 880 dual core currently starts at over USD 1,600.00 each, which makes your configuration start at about 7,500 just for the MB and CPUs. Then add the registered RAM, server case, big juicy power supply, drives, video, monitor, a UPS to protect all of that... It sounds sexy but realistically its going to be close to $10K if you build it yourself.

    --
    And as you tread the halls of sanity, You feel so glad to be, Unable to go beyond. I have a message, From another time..
  33. stating the obviou... by adolf · · Score: 2, Interesting

    Right then. So how long before they just include some weak general-purpose instructions in the GPU, add SATA and ethernet to the cards, and call it a budget PC?

    1. Re:stating the obviou... by CalcWiz · · Score: 2, Informative

      It just doesn't work that way. GPU's get their advantage because they are highly parallel and heavily pipelined. This makes it easier and cheaper to add more computational power to the card. The problem is that there are a lot of things you just can't do efficiently. The time it takes for one piece of data to get through the pipeline prohibits many general purpose operations. The big advantage for a lot of applications is that it takes just about the same amount of time for thousdands to millions of pieces of data to get through the pipeline, they just can't depend on each other.

      Go read a tutorial on CPU architecture and where it talks about pipelining replace the pipeline that takes 5 cycles end to end with one that takes thousands of cycles and imagine how you could write basic algorithms. Worse yet, imagine how you would handle IO or interrupts.

      --
      If PRO- is the opposite of CON-, What's the opposite of Progress?
  34. Re:Uhh.. [little correction] by faragon · · Score: 2, Insightful

    For both MP3, JPEG, and MPEG4 the transformation used is not a Fourier transform (not even TDFT/FFT), but DCT/IDCT ([inverse]discrete cosine transform). The reason for using DCT instead of the FFT (equivalent to the time Discrete Fourier Transform) is because the DCT is computationally cheaper than the FFT (about one half, in the fundamentals is really a mutilated DFT/FFT), and it provides enough information for the band discarding approaches used in lossy data compression.

  35. 32 bit not good enough by MonaLisa · · Score: 2, Interesting

    The sizes of transforms they are using for comparison here are of lengths of the order of 1 million points. This is huge for an FFT, and truncation error will definitely come into play here using only 32-bit precision. It all depends on what you are doing whether this will be adequate or not. Also, it's not at all clear what they did on the other platforms. There are some tricks to doing very long sequences; essentially using a 2D transform to perform a long 1D transform. It's not trivial, and requires some extra work, but generally a lot more efficient than taking a 1D transform and shoving a 4 million element transform into it. The inner loops of a 1D transform will eventually trash the cache for such a large transform, so using a blocked 2D transform avoids this, with some overhead of course. It's hard to tell what they are doing from the performance curves, since they report seconds, and it needs to be scaled by n log n to really see what's going on. It's cool they tried this, though. I was looking at using a GPU to do FFTs and linear algebra kernels a couple of years ago, but decided not to go there as I didn't think it would pay off; mostly because of the 32-bit precision.

  36. Re:As you should very well know... by Jesus_666 · · Score: 3, Funny

    Knowing how to hook up a composite video input is irrelevant. The civilised world uses SCART. You can't screw up hooking up SCART.


    And just you wait, France will develop a European alternative to that Fourier nonsense as well!

    --
    USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
  37. Re:As you should very well know... by jawtheshark · · Score: 3, Funny
    Just in case some people don't get the following statement:

    And just you wait, France will develop a European alternative to that Fourier nonsense as well!

    Read ... And notice the country....

    Mod the guy up.. He might be a troll, but he is funny :-D

    --
    Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
  38. Pro Audio applications? by rekoil · · Score: 2, Interesting

    I'm wondering whether or not the DSP latency of these libraries is sufficient to use with real-time audio processing...if folks were to write RTAS/AU/VST plugins using the library, how they would compare to other hardware-assisted DSP solutions such as the PowerCore and Pro Tools farm cards. Then again, if you have to spend $500 on a card to get this goodness, it's hardly a bargain (albeit cheaper than the above products...)

  39. Nope! by woolio · · Score: 3, Informative

    Sorry, the FFT of a time-domain signal does **NOT** indicate how the power (or energy) of the signal is distributed.

    For the latter, you need a PSD (power spectral density) plot, which is obtained by finding the square of the magnitude of the freq-domain FFT (complex) outputs.

    And the term "FFT" usually describes a specific class of algorithms that finds a Discrete Fourier Transform of a signal in much less than O(N^2) time, where N is the number of elements/samples considered.

    However, the FFT is also useful to perform fast polynomial multiplication (and even fast multiplication of very very very long numbers). This application has nothing to do with power or frequencies in a signal.

  40. Re:Errr, I don't want to sound skeptical... by eh2o · · Score: 2, Informative

    djbfft apparently had an edge at some point, but now has not been updated for more than 5 years. meanwhile FFTW has incremented the major version number to 3, undergone a complete rewrite, added simd, multiprocessor, 64bit and a slew of other things (its obviously not a stagnant project). not to mention its the basis of the 'fft' function in matlab and thereby probably the most used fft implementation in the world. assuming their benchmarks (which now include accuracy as well as speed) are valid, Intel Performance Suite is probably their closest competitor.

  41. Your error analysis is totally wrong by stevenj · · Score: 4, Informative
    The Cooley-Tukey FFT algorithm and its variants, which is what they are using, has much better error characteristics than you think.

    In floating-point arithmetic, the algorithm was proved in 1966 to have an upper bound for the error that grows only as O(log N), and the mean (rms) error grows only as O(log N). (See this page for more info.) (Errors in fixed-point arithmetic are worse, going as N.)

    Even in single precision, the errors for their FFT sizes are probably quite reasonable, assuming they haven't done something silly like use an unstable trigonometric recurrence.

    --
    If a thing is not diminished by being shared, it is not rightly owned if it is only owned & not shared. S. Augustine
  42. erratum by stevenj · · Score: 3, Informative

    That should be O(sqrt(log N)) for the rms error and O(sqrt(N)) for fixed point. (My sqrt symbols didn't post properly somehow)

    --
    If a thing is not diminished by being shared, it is not rightly owned if it is only owned & not shared. S. Augustine
  43. Re:Based on FFTW? by Anonymous Coward · · Score: 2, Informative

    You're right, they give them no credit. From TFA:

    We are not porting FFTW to GPUs and our project is not related to FFTW. FFTW is a more general library designed mainly for CPUs. GPUFFTW uses some cache optimizations to obtain maximum memory performance on GPUs.

  44. IF by Mark_MF-WN · · Score: 2, Funny

    What is newsworthy is that this is a shameless attempt to secularize mathematics. It's right in the name -- Fast Fourier Transformation. That's idolatry. What can a man know about signals that God hasn't already made clear in the Word? Come to our website, and you can learn all about Intelligent Factoring, which is on much sounder mathematical grounds because it develops entirely from biblical principles.