Focus On The Programmer
"Every programmer has their own favorite language," says Phil Rogers. "They can almost be religious about it. You don’t want to tell a programmer that he has to change the way he currently develops applications in order to deliver better experiences. HSA enables heterogeneous computing for all high-level languages over time."
Compatibility with C and C++ might have been sufficient for some, but AMD wanted to make sure everyone was covered, so it expanded HSA to work with C#, Java, and even functional languages. And because there’s only so much AMD can do on its own, the company decided to turn HSA into an open standard governed by the HSA Foundation, which boasts founding members including ARM, MediaTek, and Texas Instruments. Officially launched in June 2012, the HSA Foundation’s goal is to promote HSA-enabled platforms and software at all levels. This includes making SDKs, libraries, training, and other resources available to all programmers, often for free. From a developer perspective, the whole idea of HSA is that programmers can now easily take advantage of the heterogeneous compute model in their apps without being bound to design or write in any certain way.
"Programmers don’t just program to the metal," says AMD’s Manju Hegde. "They need proper compilers, debuggers, profilers, optimization tools, libraries. These are the tasks ahead of us, which is why we established the HSA Foundation, to drive the standard forward. A lot of the tools we do will be open sourced. This will give partners quicker time to market and lower the financial burden. When the software ecosystem sees that this is a genuine industry effort, the value of that will not be lost upon them. Because this is one of the first times that hardware companies are making changes to chip architecture to accommodate ease of software development. Tons of companies make changes because they want new capabilities, new features. But we’ve made changes simply to make it easier for programmers. That’s what’s needed to make things pervasive."
It’s important to keep in mind that OpenCL and HSA are two very different things, and it’s likely that the former will evolve to better fit the latter with time. Even without HSA, OpenCL offers a much different programming experience than it did even two years ago. For example, OpenCL 1.2 drastically reduces the amount of initialization code and other overhead code that used to be required for OpenCL. With HSA, that trend toward simplicity and performance will continue as programmers no longer need to manage two different memory spaces.
"Say a programmer uses Visual Studio today, writing C++ apps in Windows," says Phil Rogers. "There are hundreds of thousands of programmers doing that. For them, they can use this new technology in Visual Studio Microsoft released called C++ AMP, short for Accelerated Massive Parallelism. In C++ AMP, they only added two keywords to the language, restrict and array_view, and just by adding those two functions, those programs are marked for offload into GPU. The tiny change to the program gives numerous benefits when they have chunks of very parallel code in existing applications. It’s a much easier transition than one might expect."