Although this year's Apple World Wide Developers Conference has everyone talking about the 3G iPhone, it's not the only thing to come out of Apple's annual developers meet & greet. Most of WWDC is dedicated to showcasing new technologies and techniques for developers along with filling them in on what Apple's going to be doing in the next year so that developers can plan things accordingly. Unfortunately much of this isn't shared far and wide, and with whom it's shared there's an NDA making sure it doesn't go any farther.

But this doesn't mean that we don't get anything out of WWDC, just less than we'd like. Case in point, Apple has announced that they're already working on Mac OS X 10.6 "Snow Leopard" which they will be releasing in roughly a year. Snow Leopard is billed as a rather minor upgrade from the end-user side of things as Apple focuses on performance and stability rather than 129 new features. Given that Leopard was coldly receipted by Apple standards, this probably isn't a bad choice by Apple. This doesn't mean that there won't be any new features however, Snow Leopard it appears is all about the developers as Steve Jobs embarks on a search for the Holy Grail of computing.

On the development side of things, there are two technologies that Apple is talking about right now: Grand Central and OpenCL. Apple has become (rightfully) concerned about the disjoint advancement of hardware and software that can use said hardware. We've talked before about how the movement from a fast single-core CPU to a slower multi-core CPU has created problems for developers; writing good multithreaded code is hard, really really hard. It's hard because doing multiple things at once is difficult to schedule, it's hard because doing multiple things at once can lead to odd results (race conditions), it's hard because not everything can even be split-up/parallelized, and it's hard because C-style languages were originally designed to be written and executed in a very linear way. Given the difficulties in writing good multithreaded code, it has become the Holy Grail of modern computing to be able to easily write/convert large programs so that they are efficiently multithreaded.

Grand Central is Jobs' search for this Holy Grail. Apple hasn't released a great deal of information about Grand Central beyond closed doors, but we do know that it's a new technology Apple is working on to make it easier to write multithreaded applications. They have even gone so far as to call it a "parallel-processing breakthrough" when talking to the New York Times; Apple makes no small boast in this case. The big question is what exactly Grand Central is, as "technology" is all all-encompassing term that can be anything from a library of optimized functions to an entirely new programming language. Apple seems rather attached to Objective-C at this point and libraries have proven to only be useful in very specific situations so we consider either extreme unlikely, but the middle is also a very big place.

We've thrown around the idea of a new auto-parallelizing compiler or perhaps something in Xcode to help direct developers on writing better multithreaded code, but really anything is possible with such vague descriptions. The bigger question on our mind is if Apple is capable of making this kind of breakthrough; they have some very capable engineers but they're also not on the list of companies we first think of when discussing fundamental computer science problems. The company's strength has been in business, hardware engineering, and "soft" programming issues such as GUIs and usage patterns; Apple does not have a lot of published experience at solving the hard and overly technical problems such as multithreading. We very much hope to be proven wrong here as a breakthrough as big as Apple is promising could change the entire industry, but when one goes searching for the Holy Grail a little bit of skepticism is in order.

Moving on, we have the other piece of Apple's new performance technology, the Open Computing Language (OpenCL). OpenCL is a C language for GPGPU computing, similar to CUDA and Brook+ for NVIDIA and AMD respectively. Currently CUDA and Brook+ are incompatible, both are C but the languages are different enough that programs are not portable between the two, and neither can compile for the other company's GPUs. Full GPGPU support has been notably absent from the Mac so far while CUDA and Brook+ have been supported on Windows and Linux for some time now. We have heard that Apple has wanted to add full GPGPU support to the Mac for some time now (having been one of the first companies to embrace early GPGPU usage for their video editing applications) but we have also heard that they are unhappy about the incompatibility between the GPGPU languages. They don't want to have to write two of everything, nor do they want their developers doing so. There are 3rd parties that offer GPGPU programming environments that are cross-GPU compatible, but these are expensive and not at all open in any sense of the word.

So we have OpenCL, Apple's proposed universal GPGPU programming language and API. From what we know it looks like Apple is trying to make OpenCL the GPGPU sibling of OpenGL, but like Grand Central Apple has said very little so far. We're not sure who (if anyone) else is backing OpenCL, although we expect AMD and NVIDIA to be on-board otherwise the whole effort will fall flat on its face without support from the GPU manufacturers. Apple has said it's beyond CUDA and Brook+, although we're not entirely sure in what way. From what we've seen of CUDA and Brook+, both are very powerful and very functional languages, so it's unlikely OpenCL is adding any new features that will expand what developers can do; nearly anything can already be done. Rather it seems Apple will be going the simplification route, as CUDA and Brook+ are anything but simple to program for; they may use C but they currently have many nuances that have to be dealt with. An even further generalized framework that's more open to less technical programmers may be what Apple is shooting for. But like Grand Central, we're going to be waiting some time until Apple fully explains where they're going and why.
Comments Locked

18 Comments

View All Comments

  • JulesLt - Tuesday, July 1, 2008 - link

    Apple may not have a reputation for 'hard' basic comp-sci in the same was as IBM or even MS, but it's worth remembering this is the firm that based it's O/S around a micro-kernel when they were still an academic novelty.

    We also tend to forget the fact they maintain an Advanced Computing Group, with a strong focus on HPC / grid computing - remember the stories of the supercomputers made from clustered G5 machines (back when the G5 actually was the fastest processor)??

    Being the main proponents of Obj-C also makes them effectively the designers of a programming language, and it's OO runtime, which are again non-trivial problems. Be interesting to see what they're going to do with a CPU design firm too.

    Anyway, I just wanted to add that the third major thing they're doing right now, which wasn't covered above, is the work around the LLVM project and clang - effectively replacing gcc with a new open-source compiler that has better integration with development tools at the front-end (clang) and spits out portable byte code at the back end.

    If you're the kind of person who likes drawing inferences - if you wanted the ability to move code execution between different CPU/GPU architectures, compiling down to an intermediate byte code, then JIT optimising it for the CPU instruction set in question sounds an ideal approach.

    As for Grand Central - the name implies dispatching and routing, rather than automatic parallelisation to me. Now a lot of the problems of concurrent computing are pretty similar to those of distributed computing, which IS an area where Apple have form. I'm guessing little more than a simple, lightweight way of balancing workload between cores. If it simplifies things in the same way that Obj-C distributed objects simplify things over the C++ equivalents then it will be significant.

    (It's also worth noting that the Cocoa frameworks already apply some automatic multi-core enhancements to user applications, with work delegated across different cores and the GPU).
  • Homerpalooza - Thursday, June 12, 2008 - link

    "We've talked before about how the movement from a fast single-core CPU to a slower multi-core CPU has created problems for developers; writing good multithreaded code is hard, really really hard"

    Ain't that the truth. This is exactly the challenges Cray Research fielded in moving from core CPUs to multiple CPUs many decades ago. As oft quoted at Cray "1000 chickens all pulling at once" doesn't make up for real power.

    Multicores are here to stay. The only other solution is a heat dissipation problem. So with that said... they need to make the multiple CPUs function together. To truly get the performance of MPP machines in a desktop.

    That said, MPP has been achieved. MPP is here, and runs the fastest supercomputers in the world. The exact same core OS problems for MPP are those for onboard parallel processing. And it's well understood.

    Apple may not be known in the "Hard Computer Science" realms, but I suspect a company like SGI is. OpenGL (made by SGI) is the perfect technology to get the ball rolling. Why not buy Nvidia? Or SGI?



  • MaxDepth - Thursday, June 12, 2008 - link

    Ryan,
    Did you get to attend? One of the companies Jobs introduced at the opening is located here in Durham, NC.

    Modality -- creates flashcards and other learning tools for Apple products. Yay for the Triangle!
  • hakhak - Wednesday, June 11, 2008 - link

    " Full GPGPU support has been notably absent from the Mac so far while CUDA and Brook+ have been supported on Windows and Linux for some time now."

    Document yourself, CUDA is now available on mac...

    http://www.nvidia.com/object/cuda_get.html#macos">http://www.nvidia.com/object/cuda_get.html#macos

  • icingdeath88 - Wednesday, June 11, 2008 - link

    5 points to the first person who can tell me what the P in Steven P. Jobs stands for without using Wikipedia.
  • Crassus - Thursday, June 12, 2008 - link

    Paul
  • icingdeath88 - Thursday, June 12, 2008 - link

    Congrats the 5 points are yours! too bad they're worthless...
  • Crassus - Thursday, June 12, 2008 - link

    I took it more as a challenge to my skills as a researcher :)

    How many points will get me a working lunch with Anand?
  • Crassus - Thursday, June 12, 2008 - link

    http://ei.cs.vt.edu/~history/Jobs.html">http://ei.cs.vt.edu/~history/Jobs.html
  • Barack Obama - Wednesday, June 11, 2008 - link

    It's not even on wikipedia lol

Log in

Don't have an account? Sign up now