Stupid question on SP/DP & FP

Discussion in 'GPGPU Technology & Programming' started by LarsJurgen, Apr 29, 2008.

  1. LarsJurgen

    Newcomer

    Joined:
    Apr 28, 2008
    Messages:
    3
    Likes Received:
    0
    When talking about SP & DP FP calculations, can one compare apple & oranges or is it the same thing?

    I am on thin ice, but is a FP always a FP, except it being SP OR DP? Or is there tons of ISA things to consider? CAN a GPGPU be helped to improved FP performance on a PC systems? Or must, for example a game, be designed for it & if so for a brand? IE NVIDIA or AMD. Can a "program" be used so that it aids the CPU in FP calculations?
     
  2. pcchen

    pcchen Moderator
    Moderator Veteran Subscriber

    Joined:
    Feb 6, 2002
    Messages:
    2,751
    Likes Received:
    127
    Location:
    Taiwan
    Of course, both SP and DP are floating point numbers. The difference is just the number of digits. 32 bits FP (single precision) is roughly equivalent to about 7 decimal digits, while 64 bits FP (double precision) is roughly 16 decimal digits.

    Basically, in most practical use, 7 decimal digits seem to be quite good enough. However, depending on algorithms, error can accumulate and sometimes to a quite large amount, even with stable algorithms, especially when the amount of data is large.

    Other considerations are not actually about precision, but about other things. For example, current NVIDIA GPU do not have accurate FP divider (it uses "multiply by reciprocal" to do division). In some applications these can be very bad.

    On the other hand, many applications do not need high precision. For example, many image processing algorithms can work well with single precision FP, since their input values are limited in digits (8 bits per component is the most common form).
     
  3. LarsJurgen

    Newcomer

    Joined:
    Apr 28, 2008
    Messages:
    3
    Likes Received:
    0
    So FP "real performance", ISA does not matter? & you can throw the same problem at a cell, GPGPU, FPGA made for FP or x86 cpu?
     
  4. 3dilettante

    Legend Alpha

    Joined:
    Sep 15, 2003
    Messages:
    8,122
    Likes Received:
    2,873
    Location:
    Well within 3d
    ISA and implementation can have effects.

    In the ISA case, a brain-dead ISA can royally screw up FP performance.
    x87 is proof enough of that.

    In the case of just throwing any problem at any architecture, I'd say yes and no.
    If you mean just throwing a given algorithmic implementation to any architecture, no. The more exotic the architecture, the more likely you'd hit a snag where performance craters without refactoring something.

    In the case of using the same program, no.
    Some amount of change is often necessary, as even different x86 architectures don't always output bit-identical results.
     
  5. Tim Murray

    Tim Murray the Windom Earle of mobile SOCs
    Veteran

    Joined:
    May 25, 2003
    Messages:
    3,278
    Likes Received:
    66
    Location:
    Mountain View, CA
    Correct. The ISA doesn't matter. What matters is how the chip conforms (or diverges) from the IEEE 754 spec (assuming you're comparing to an x86 CPU--I don't know if there are others worth considering from other exotic architectures).
     
  6. ChronoReverse

    Newcomer

    Joined:
    Apr 14, 2004
    Messages:
    245
    Likes Received:
    1
    Someone somewhere said that the RV770 DP isn't IEEE compliant while the GT200 DP is. I'm wondering if this is true?
     
  7. 3dilettante

    Legend Alpha

    Joined:
    Sep 15, 2003
    Messages:
    8,122
    Likes Received:
    2,873
    Location:
    Well within 3d
    I'm not sure any GPU, or CELL is truly completely IEEE-754 compliant.
    There's usually some corner cases with rounding modes and whatnot that just aren't covered.

    GT200's DP unit seems to be more compliant with respect to denormals or at least reporting them, but I'm not sure it fully covers the spec.

    Only SSE and some of the FP coprocessors like Clearspeed are fully (almost fully?) compliant on SP and DP.

    Unless something changes, those that care the most about compliance might not be overly swayed by either GPU vendor.
    Larrabee, if its vector instructions don't sacrifice compliance, would have a leg up unless future GPUs change.
     
  8. Arun

    Arun Unknown.
    Moderator Legend Veteran

    Joined:
    Aug 28, 2002
    Messages:
    5,023
    Likes Received:
    299
    Location:
    UK
    Heh, don't believe the hype: Last I looked, current Clearspeed solutions don't even handle denormals properly(!)
     
  9. 3dilettante

    Legend Alpha

    Joined:
    Sep 15, 2003
    Messages:
    8,122
    Likes Received:
    2,873
    Location:
    Well within 3d
    That just leaves x87 and SSE, possibly.
     
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...