`
iwebcode
  • 浏览: 2010705 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
文章分类
社区版块
存档分类
最新评论

GPU computing to C++ with C++ AMP

 
阅读更多

Keynote at the AMD Fusion Developer Summit

April 6, 2011 by Herb Sutter

In a couple of months, I’ll be giving a keynote at the AMD Fusion Developer’s Summit, which will be held on June 13-16, 2011, in Bellevue, WA, USA.

Here’s my talk’s description as it appears on the conference website:

AFDS Keynote: “Heterogeneous Parallelism at Microsoft”
Herb Sutter, Microsoft Principal Architect, Native Languages

Parallelism is not just in full bloom, but increasingly in full variety. We know that getting full computational performance out of most machines—nearly all desktops and laptops, most game consoles, and the newest smartphones—already means harnessing local parallel hardware, mainly in the form of multicore CPU processing. This is the commoditization of the supercomputer.

More and more, however, getting that full performance can also mean using gradually ever-more-heterogeneous processing, from local GPGPU and Accelerated Processing Unit (APU) flavors to “often-on” remote parallel computing power in the form of elastic compute clouds. This is the generalization of the heterogeneous cluster in all its NUMA glory, and it’s appearing at all scales from on-die to on-machine to on-cloud.

In this talk, Microsoft’s chief native languages architect shares a vision of what this will mean for native software on Microsoft platforms from servers to devices, and showcases upcoming innovations that bring access to increasingly heterogeneous compute resources — from vector units and multicore, to GPGPU and APU, to elastic cloud — directly into the world’s most popular native languages.

If you’re interested in high performance code for GPUs, APUs, and other high-performance TLAs, I hope to see you there.

Note: This talk is related to, but different from, the GPU talk I’ll be presenting in August at C++ and Beyond 2011 (aka C&B). You can expect the above keynote to be, well, keynote-y… oriented toward software product features and of course AMD’s hardware, with plenty of forward-looking industry vision style material. My August C&B technical talk will be just that, an in-depth performance-oriented and sometimes-gritty technical session that will also mention product-related and hardware-specific stuff but is primarily about heterogeneous hardware, with a more pragmatically focused forward-looking eye.

Targeting Heterogeneity with C++ AMP and PPL

S.Somasegar

15 Jun 2011 8:30 AM

Previously, I blogged about key trends in software development starting with concurrency/parallelism, and indeed today multi-core systems are everywhere. You can target multi-core systems from many mainstream programming languages, and with Visual Studio 2010 we delivered market leading tooling for parallel development and debugging. You can see my post on our concurrency enhancements to C++ for VS2010 and here for a walkthrough of our parallel debugging tools.

In the last few years, we have been seeing an additional trend of heterogeneous hardware where, for example, developers take advantage of the GPU for computational purposes for their data parallel algorithms. This has been successful in narrow verticals using niche programing models. Microsoft wants to bring to the mainstream the ability to write code that takes advantage of heterogeneous hardware like GPUs. So like we’ve done with multi-core before, we are bringing this ability to the next version of Visual Studio.

I’m excited to announce that we are introducing a new technology that helps C++ developers use the GPU for parallel programming. Today at the AMD Fusion Developer Summit, we announced C++ Accelerated Massive Parallelism (C++ AMP). Additionally, I’m happy to say that we intend to make the C++ AMP specification an open specification.

By building on the Windows DirectX platform, our implementation of C++ AMP allows you to target hardware from all the major hardware vendors. We expect that it will be part of the next Visual C++ compiler and fully integrated in the next release of Visual Studio experience.

In addition, there is more work that we are doing on parallel computing. We also announced new enhancements to the next version of Parallel Patterns Library (PPL) and the C++ Concurrency Runtime. You can find easy-to-use C++ templates and runtime support to express algorithms for your domain expertise which scale on any provided hardware with PPL, Agent and the C++ Concurrency Runtime. With C++ AMP and PPL, we aim to make the next version of Visual Studio the most productive environment for targeting heterogeneous hardware available.

We will be making the session recording from Herb Sutter’s keynote session and Daniel Moth’s break-out session from the AMD Fusion conference available shortly. Please check the Visual C++ Team Blog or Channel 9 for those videos.

Namaste!

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Introducing C++ Accelerated Massive Parallelism (C++ AMP)

Diegum

15 Jun 2011 10:30 AM

A few months ago, Herb Sutter told about a keynote he was to delivered today in the AMD Fusion Developer Summit (happening these days). He said by then:

“Parallelism is not just in full bloom, but increasingly in full variety. We know that getting full computational performance out of most machines—nearly all desktops and laptops, most game consoles, and the newest smartphones—already means harnessing local parallel hardware, mainly in the form of multicore CPU processing. (…) More and more, however, getting that full performance can also mean using gradually ever-more-heterogeneous processing, from local GPGPU and Accelerated Processing Unit (APU) flavors to “often-on” remote parallel computing power in the form of elastic compute clouds. (…)”

In that sense, S. Somasegar, Senior Vice President of the Developer Division made this morning the following announcement:

“I’m excited to announce that we are introducing a new technology that helps C++ developers use the GPU for parallel programming. Today at the AMD Fusion Developer Summit, we announced C++ Accelerated Massive Parallelism (C++ AMP). (…) By building on the Windows DirectX platform, our implementation of C++ AMP allows you to target hardware from all the major hardware vendors. (…)”

C++ AMP, as Soma tells in his post, is actually an open specification. Microsoft will deliver an implementation based on its Windows DirectX platform (DirectCompute, as Sr. Program Manager Daniel Moth specifies in a later post a few minutes ago).

Daniel added that C++ AMP will lower the barrier to entry for heterogeneous hardware programmability, bringing performance to the mainstream. Developers will get an STL-like library as part of the existing concurrency namespace (whose Parallel Patterns Library –PPL- and its Concurrency Runtime –ConcRT- are also being enhanced in the next version of Visual C++) in a way that developers won’t need to learn a different syntax, nor using a different compiler.

Both Soma and Daniel finish by telling that these sessions at the AMD Fusion Developer Summit are being recorded and will be published later this week on Channel 9. We’ll provide here some updates when those videos are live –you can also register here to see the rest of the summit live.

Pedal to the metal, let’s go native at full speed!

References:

  1. S. Somasegar’s announcement: http://blogs.msdn.com/b/somasegar/archive/2011/06/15/targeting-heterogeneity-with-c-amp-and-ppl.aspx
  2. Daniel Moth’s blog post: http://www.danielmoth.com/Blog/C-Accelerated-Massive-Parallelism.aspx
  3. Herb Sutter about his keynote at the AMD Fusion Developer Summit:http://herbsutter.com/2011/04/06/fusion/
  4. AMD Fusion Developer Summit Webcasts: http://developer.amd.com/afds/pages/webcast.aspx

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#############################################################################################

Microsoft brings GPU computing to C++ with C++ AMP
by Cyril Kowaliski — 12:22 AM on June 16, 2011

Look out, OpenCL. Microsoft has set its sights on the democratization of development for heterogeneous systems, and it's pulled out the big guns. At the AMD Fusion Developer Summit today, Microsoft's Herb Sutter announced an extension to the C++ language designed to let programmers tap into any DirectCompute-capable graphics hardware for general-purpose tasks. Microsoft calls the new extension C++ Accelerated Massive Parallelism, or C++ AMP for short, and it aims to make it an open spec that can be implemented on non-Microsoft platforms with non-Microsoft compilers.

Sutter presented C++ AMP as a way to cut through what he called the "jungle of heterogeneity." The PowerPoint slide below illustrates the full extent of that jungle as Sutter sees it, with processors in increasing order of specialization on the Y axis and memory systems in increasing order of non-uniformity and disjointedness mapped to the X axis. It's definitely not pretty:

C++ currently gives developers free reign in the bottom left corner of that jungle, Sutter said, but C++ AMP expands the roaming area dramatically. Not only that, but Microsoft hopes to support other specialized processors with future releases of C++ AMP, thus extending its domain over time.

So, what does C++ AMP entail? Sutter bills it as "minimal," and indeed, the list of additions is a short one:

The additions on which Sutter dwelt the most are array_view and restrict(). The former was described in the PowerPoint presentation as a "portable view that works like an N-dimensional 'iterator range'" and billed as a way to deal with memory that may not be uniform. The restrict() function was easier to grasp for a non-coder like me. If I understand correctly, it simply allows developers to create functions that execute on DirectCompute devices exclusively—all you have to do is toss "restrict(direct3d)" in there, like so:

(The code on the left is regular C++, while the code on the right is C++ AMP. That man in the bottom right corner is Microsoft's David Moth, who got into the nitty-gritty details of C++ AMP during a technical session after Sutter's keynote.)

Now, there will be restrictions on what can go inside, er, restrict()-ed functions, since DirectCompute-capable GPUs can only support a subset of the C++ language. Nevertheless, programs written with C++ AMP will be compiled as single executables capable of making use of DirectCompute-capable hardware if it's there. (I'm guessing developers will be able to include fallback code paths so systems without DirectCompute GPUs can just use the CPU to do the work.)

Microsoft said it will include C++ AMP support in the next version of Visual Studio. Of course, since C++ AMP is an open spec, Visual Studio won't be the only way to write C++ AMP code and compile it. In fact, Sutter said Microsoft and AMD are already working together on non-Windows compilers. (Lest you think Nvidia is being left out, a post on Nvidia's blog says the firm "continues to work closely with Microsoft to help make C++ AMP a success.")

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics