Derek Gets Technical Again: Of Warps, Wavefronts and SPMD

From our GT200 review, we learned a little about thread organization and scheduling on NVIDIA hardware. In speaking with AMD we discovered that sometimes it just makes sense to approach the solution to a problem in similar ways. Like NVIDIA, AMD schedules threads in groups (called wavefronts by AMD) that execute over 4 cycles. As RV770 has 16 5-wide SPs (each of which process one "stream" or thread or whatever you want to call it) at a time (and because they said so), we can conclude that AMD organizes 64 threads into one wavefront which all must execute in parallel. After GT200, we did learn that NVIDIA further groups warps into thread blocks, and we just learned that their are two more levels of organization in AMD hardware.

Like NVIDIA, AMD maintains context per wavefront: register space, instruction stream, global constants, and local store space are shared between all threads running in a wavefront and data sharing and synchronization can be done within a thread block. The larger grouping of thread blocks enables global data sharing using the global data store, but we didn't actually get a name or specification for it. On RV770 one VLIW instruction (up to 5 operations) is broadcast to each of the SPs which runs on it's own unique set of data and subset of the register file.

To put it side by side with NVIDIA's architecture, we've put together a table with what we know about resources per SM / SIMD array.

NVIDIA/AMD Feature NVIDIA GT200 AMD RV770
Registers per SM/SIMD Core 16K x 32-bit 16K x 128-bit
Registers on Chip 491,520 (1.875MB) 163,840 (2.5MB)
Local Store 16KB 16KB
Global Store None 16KB
Max Threads on Chip 30,720 16,384
Max Threads per SM/SIMD Core 1,024 > 1,000
Max Threads per Warp/Wavefront 960 256 (with 64 reserved)
Max Warps/Wavefronts on Chip 512 We Have No Idea
Max Thread Blocks per SM/SIMD Core 8 AMD Won't Tell Us
That's right, AMD has 2.5MB of register space

We love that we have all this data, and both NVIDIA's CUDA programming guide and the documentation that comes with AMD's CAL SDK offer some great low level info. But the problem is that hard core tuners of code really need more information to properly tune their applications. To some extent, graphics takes care of itself, as there are a lot of different things that need to happen in different ways. It's the GPGPU crowd, the pioneers of GPU computing, that will need much more low level data on how resource allocation impacts thread issue rates and how to properly fetch and prefetch data to make the best use of external and internal memory bandwidth.

But for now, these details are the ones we have, and we hope that programmers used to programming massively data parallel code will be able to get under the hood and do something with these architectures even before we have an industry standard way to take advantage of heterogeneous computing on the desktop.

Which brings us to an interesting point.

NVIDIA wanted us to push some ridiculous acronym for their SM's architecture: SIMT (single instruction multiple thread). First off, this is a confusing descriptor based on the normal understanding of instructions and threads. But more to the point, there already exists a programming model that nicely fits what NVIDIA and AMD are both actually doing in hardware: SPMD, or single program multiple data. This description is most often attached to distributed memory systems and large scale clusters, but it really is actually what is going on here.

Modern graphics architectures process multiple data sets (such as a vertex or a pixel and its attributes) with single programs (a shader program in graphics or a kernel if we're talking GPU computing) that are run both independently on multiple "cores" and in groups within a "core". Functionally we maintain one instruction stream (program) per context and apply it to multiple data sets, layered with the fact that multiple contexts can be running the same program independently. As with distributed SPMD systems, not all copies of the program are running at the same time: multiple warps or wavefronts may be at different stages of execution within the same program and support barrier synchronization.

For more information on the SPMD programming model, wikipedia has a good page on the subject even though it doesn't talk about how GPUs would fit into SPMD quite yet.

GPUs take advantage of a property of SPMD that distributed systems do not (explicitly anyway): fine grained resource sharing with SIMD processing where data comes from multiple threads. Threads running the same code can actually physically share the same instruction and data caches and can have high speed access to each others data through a local store. This is in contrast to larger systems where each system gets a copy of everything to handle in its own way with its own data at its own pace (and in which messaging and communication become more asynchronous, critical and complex).

AMD offers an advantage in the SPMD paradigm in that it maintains a global store (present since RV670) where all threads can share result data globally if they need to (this is something that NVIDIA does not support). This feature allows more flexibility in algorithm implementation and can offer performance benefits in some applications.

In short, the reality of GPGPU computing has been the implementation in hardware of the ideal machine to handle the SPMD programming model. Bits and pieces are borrowed from SIMD, SMT, TMT, and other micro-architectural features to build architectures that we submit should be classified as SPMD hardware in honor of the programming model they natively support. We've already got enough acronyms in the computing world, and it's high time we consolidate where it makes sense and stop making up new terms for the same things.

That Darn Compute:Texture Ratio A Quick Primer on ILP and ILP vs. TLP Extraction
Comments Locked

215 Comments

View All Comments

  • 0g1 - Wednesday, June 25, 2008 - link

    In the article it says the GT200 doesn't need to do ILP. It only has 10 threads. Each of those threads needs ILP for each of the SP's. The problem with AMD's approach is each SP has 5 units and is aimed directly at processing x,y,z,w matrix style operations. Doing purely scalar operations on AMD's SP's would be only using 1 out of the 5 units. So, if you want to get the most out of AMD's shaders, you should be doing vector calculations.
  • DerekWilson - Wednesday, June 25, 2008 - link

    The GT200 doesn't worry with ILP at all.

    a single thread doesn't run width wise across all execution units. instead different threads execute the exact same single scalar op on their own unique bit of data (there is only one program counter per SM for a context). this is all TLP (thread level parallelism) and not ILP.

    AMD's compiler can pack multiple scalar ops into a 5-wide VLIW operation.

    on purely scalar code with many independent ops in a long program, AMD can fill all their units and get close to peak performance. explicit vector instructions are not necessary.
  • gigahertz20 - Wednesday, June 25, 2008 - link

    http://www.hardwarecanucks.com/forum/hardware-canu...">http://www.hardwarecanucks.com/forum/ha...870-512m...



    The site above mounted an after market cooler on it and got awesome results. Either the Thermalright HR-03 GT is just that great of a GPU cooler, or the standard heatsink/fan on the 4870 is just that horrible. Going from 82C to 43C at load and 55C to 33C at idle, just from an after market cooler is crazy! I was hoping to see some overclocking scores after they mounted the Thermalright on it, but nope :(
  • Matt Campbell - Wednesday, June 25, 2008 - link

    The HR-03GT really is that great. Check it out: http://www.anandtech.com/casecoolingpsus/showdoc.a...">http://www.anandtech.com/casecoolingpsus/showdoc.a...

    Our 8800GT went from 81 deg. C to 38 deg. C at load, 52 to 32 at idle. That's also with the quietest fan on the market at low speed. And FWIW, I played through all of The Witcher (about 60 hours) with the 8800GT passively cooled in a case with only 1 120mm fan.

    -Matt
  • Clauzii - Wednesday, June 25, 2008 - link

    I see no fan on that thing??! PASSIVE?? :O ??
  • jeffreybt2 - Wednesday, June 25, 2008 - link

    "Please note that this is with a single Zalman 92MM fan operating at 1600RPM along with Arctic Cooling MX-2 applied to the base."
  • magnusr - Wednesday, June 25, 2008 - link

    Does the audio part of the card support PAP? If not all blu-ray audio will be downsampled to 16/48...
  • NullSubroutine - Wednesday, June 25, 2008 - link

    I would just like to point out that the 4870 falls behind the 3870 X2 in Oblivion while in every other game it runs circles around it. To me it appears to be a driver problem with Oblivion rather than an indication of the hardware not doing well there. Unless of course the answer lies in the ring bus of the R680?
  • orionmgomg - Wednesday, June 25, 2008 - link

    I would love to see more benchmarks with the CPU OCed to at least 4.0

    All the CPUs you use can hit it NP.

    Also, what about at least 2 GTX 280 Cards and their numbers. Noticed that you did have them in SLI cause the power comsumption comparisons had them, but you held back the performance numbers...

    Lets see the top 4 cards from ATI and Nvidia compete in dule GPU (no punt intended)on an X48 with DDR3 1600 and a FSB of 400x10!

    That would be really nice for the people hoe have performance systems, but may still be rocking out a pair of EVGA 8800Ultras, cause their waiting for real numbers and performance to come out - and their still paying off theye systems lol... :]
  • Ilmarin - Wednesday, June 25, 2008 - link

    You're probably aware of these already, but I'll mention them just in case:

    * Page 10 (AA comparison) is malformed with no images
    * Page 21 (Power, Heat and Noise) is missing the Heat and Noise stuff.

    Heat is a big issue with these 4800 cards and their reference coolers, so it would be good to see it covered in detail. My 7800 GTX used to artifact and cause crashes when it hit 79 degrees, before I replaced it with an aftermarket cooler. Apparently the 4870 hits well over 90 degrees at load, and the 4850 isn't much better. Decent aftermarket coolers (HR-03 GT, DuOrb) aren't cheap... and if that's what it takes to prevent heat problems on these cards, some people might consider buying a slower card (like a 9800 GTX+) just because it has better cooling.

    Anand, you guys should do a meltdown test... pit the 9800 GTX+ against the 4850, and the 4870 against the GTX 260, all with reference coolers, in a standard air-cooled system at a typical ambient temp. Forget timedemos/benchmarks... play an intensive game like Crysis for an hour or two, and see if you encounter glitches and crashes. If the 4800 cards can somehow remain artifact/crash free at those high temps, then I'd more seriously consider buying one. Heat damage over time may also be a concern, but is hard to test for.

    Sure, DAAMIT's partners will eventually put non-reference coolers on some cards, but history tells us that the majority of the market in the first few months will be stock-cooled cards, so this has got be of concern to consumers... especially early adopters.

Log in

Don't have an account? Sign up now