40 points · by dmmalam · 11y ago · 24 comments
Cell made a big splash in the high-performance computing community because it gave software the kind of fine-grained control that people with a detailed knowledge of processor architecture and their own algorithms could exploit. But the difficulty with how that kind of control was exposed meant that it was kind of all or nothing: you either optimized your code to use the SPEs correctly and efficiently, or you didn't use the SPEs at all.
I had the opportunity to talk with one of the main processor architects a while back, and I asked why they did not include any hardware-level caching for the SPEs at all - which I think would have allowed people to get that kind of incremental performance improvement. His answer was that they wanted all of the chips real estate and transistors towards the fine-grained control approach. Fair enough, but I think it would have been a lot more usable otherwise.
I think that Roadrunner (https://en.wikipedia.org/wiki/IBM_Roadrunner) was the only major deployment of the Cell processor, outside of the PlayStation 3. I always wanted to talk to videogame developers who programmed the PS3 to ask them what techniques and patterns they used for the Cell. I suspect that for some games, they ended up running much of the main game logic on the PPE, didn't bother using the SPEs, and use the GPU for all acceleration.
Disclaimer: I actually work for IBM Research now, but not on anything related to Cell.
I think a lot of PS3 games used middleware to leverage the SPEs rather than writing the code themselves. The PS3 SDK shipped with an SPE task scheduler called SPURS and a set of libraries called "Edge" that offloaded a lot of common tasks onto SPEs. Probably the biggest Edge component was Edge Animation / Edge Geometry, which basically re-implemented a mesh skinning / geometry pipeline on SPEs instead of the RSX: http://www.jonolick.com/uploads/7/9/2/1/7921194/gdc_edge_07_...
One of the most annoying things that we ran into was that it was basically impossible to buy a system to learn Cell programming on--you either had to somehow root a PS3 (which still didn't let you get all cores), or you had to buy something from Mercury Computer Systems (I think it was?) that was super expensive.
It was a niche embedded processor, and hobbled because they didn't make it easier to develop for. :(
Then they decided to put a stop to it and just removed it in a software update...
I heard speculation that it was about getting some preferential tax/customs treatment for it because it could pass for a "computer" then.
WP article: https://en.wikipedia.org/wiki/OtherOS
There's more, but I have willfully flushed it from memory. Cell was a failed design that deserved to die. I will forever after be skeptical of "heterogeneous" designs like these.
A side question: What in the POWER architecture makes it hard to implement? I was told the addressing modes are complicated enough that it will always be slower and harder to create than other processors. I'm wondering if this is urban myth or has some basis in reality?
1) http://www.amazon.com/The-Race-New-Game-Machine/dp/080653101... with a lot of articles written about the book such as http://www.wsj.com/articles/SB123069467545545011
My company (REX Computing) is working on a new processor architecture that is built around scratchpad memory... the main benefits of a scratchpad are that it is lower latency (which basically means faster), uses less area and power, and can be built into larger arrays than your regular hardware managed caches. The big drawback, as seen by Cell, is the fact that it is difficult for most programmers to manually manage their memory.
Our big advancement is that we've developed new compiler techniques (which have been DARPA funded), that would not only make it a lot easier to program the Cell architecture, but allows us to go even further than they did with Cell in making a highly parallelized and energy efficient processor.
If you're interested, check out our website (http://rexcomputing.com) and sign up for the mailing list... The only thing we have public is a very vague and more technique overview paper in general rather than a real description of what we are doing(http://memsys.io/wp-content/uploads/2015/09/p98-sebexen.pdf). It presented at a conference earlier this month (and to be published by the ACM), but I hope to give more details on our specific implementation and other cool features later this year.
If you're willing to sign a NDA, feel free to use the contact us on the website though.
I'd love to see a follow-on book about how AMD landed both the PS4 and XBox One.
The PS3 was a popular console, and game developers had to get the most out of it. I was one of those unfortunate people at times. The PS2's Emotion Engine was already a pain to use (the emotion refers to anger, btw), but the Cell raised my emotions to new levels.
The PPC core was slow and main memory latency was terrible, you had to tune code for memory access, no problem, this was understood problem, though, and workarounds were known, if painful.
Then, you ad this wonderful array of SPE's. You could access five of them, but what are these things? They're really fast vector units with a little bit of local memory - 256k, if I remember correctly, and no access to main memory.
To write code for these things, you use a different compiler, and have to manage the DMA engine yourself to keep their local memory filled with useful input, and to pull out the output. If you're doing streaming computation, you'd basically have to schedule close to 100% ideal utilization of the DMA engine and double buffer data in and out of these things (reducing useful memory to 128k/SPE). DMA had high bandwidth, but also high latency. From the time you initiate a DMA, it was something like 1800 cycles before the first block arrives. This turns into a really complicated memory and latency scheduling problem very quickly. You have to identify specific workloads which you can run asynchronously, and then how to chunk them up for DMA transfers. All this book-keeping work is actually taxing on the anemic PPC core, which has a really difficult times with performance of conditionals.
Bah! Good riddance.
http://adam.ierymenko.name/files/MersenneTwister32_spe.cpp
Was working on genetic algorithms at the time and managed to port one to run on the Cell. It's a good "embarrassingly parallel" work load for that kind of chip. The MT code above was the PRNG for the genetic algorithm.
Makes me want to hack GAs again... boy are those things barrels of fun.
SPE portion: https://gist.github.com/gigablah/1c72acbe718844310b10