Freigeben über


Present on C++ AMP

Some of you don't just want to learn C++ AMP, but you also want to present on C++ AMP to your colleagues, or at user groups and other such events. To help you with that goal, we have made available a set of slides from which you can pick the ones that fit your style and approach, and also links to screencasts showing how we do demos of samples and code. Also, I recommend that you print the C++ AMP one-pager (pdf) and hand it out to your attendees (or leave it on their chairs, etc.).

Before reading below the proposed seven sections of any C++ AMP presentation, please download the slide deck and notice how many slides have links to resources for more information on the content that the slide represents.

I strongly suggest you have the PowerPoint pptx file open while reading the rest of this blog post, so you can cross-reference from the text below - enjoy!

FIRST, grab everyone's attention by showing them what GPU computing can do, through one of the C++ AMP demos which are available on our blog. Here is how to demo our 3 favorites, just pick one.

SECOND, motivate them on why they should consider C++ AMP for GPU computing.

  • I recommend you use slides 8-10 to make the 3 points: C++ AMP offers access to GPU compute through a mainstream language; C++ AMP is future proof for this ever-evolving hardware space; in the fullness of time, C++ AMP will support all the platforms you'd ever want to target.
  • Then use either slide 11, or slides 12-15 to describe the main benefits of C++ AMP at a high level, focusing on performance, productivity, and (hardware) portability.

THIRD, introduce them to the core C++ AMP API, focusing exclusively on the simple model first

  • Use slides 17-24 to describe "Hello World", or even better demonstrate "Hello World" in Visual Studio like in this screencast.
  • [optional] Slides 25-27 are an alternative first introduction to C++ AMP, if for whatever reason you don't like the "Hello World" version.
  • [optional] Slides 28 to 37 describe further the main elements of the core C++ AMP API, in case you want to use slides for that purpose instead of code demos.
  • Use slide 38 to show the essential example of C++ AMP: Matrix Multiplication. Instead of explaining the slide, you can demonstrate matrix multiplication like in this screencast.
  • Slide 39 summarizes the core API elements.

FOURTH, introduce the tiling model (if you have less than 70 minutes, omit this section)

  • Use slides 41-43 to explain how, in today's hardware, threads are actually organized in groups, where each group shares some memory (a programmable cache), and if you take advantage of that in your code you can gain more performance - in C++ AMP you do that through tiling.
  • Use slides 44-48 to explain the additional programming constructs that the tiled model introduces.
  • Use slides 49-51 to demonstrate through code on slides tiling, or even better, demonstrate tiling in Visual Studio like in this screencast.
  • Use slides 52-54 to show how the matrix multiplication example can be converted from the simple model to the tiled model. Instead of explaining the slide, you can demonstrate matrix multiplication like in this screencast.

FIFTH, give a taster of the other parts of the C++ AMP programming model spending 1-2 minutes per slide

  • Error handling with slide 57
  • DirectX integration and interop with slide 58
  • Textures and the graphics namespace with slide 59
  • Math library with slide 60
  • Open source CodePlex libraries with slide 61

SIXTH, demonstrate Visual Studio integration

  • [optional] Use slides 63-65 to talk in general about Visual Studio integration.
  • Use slide 66 to talk about GPU debugging features, or even better demonstrate the GPU debugger like in this screencast
  • Use slide 67 to talk about the Concurrency Visualizer features.

SEVENTH, before summarizing, be sure to share useful resources for the audience to learn more.

  • Slide 69 - resources
  • Slide 70 - summary

To see an end-to-end presentation on C++ AMP as per the above, you can watch the 2-part 95-minute presentation I gave at NVIDIA's GTC and also at AMD's AFDS

  • GTC 2012 part 1, and part 2
  • AFDS 2012: register for free, login, and then navigate to "Tech Sessions" and then "Programming Tools" and then look for "Harnessing GPU Compute with C++ AMP"

Good luck with your presentation!

Comments

  • Anonymous
    August 28, 2012
    I've written an article on C++ AMP in Chinese and posted it at InfoQ.com China: www.infoq.com/.../cpp_amp_computing_on_GPU. I hope this could bring the idea of C++ AMP to Chinese.

  • Anonymous
    September 26, 2012
    Question on array_view double amp_matrix_transposition(std::vector<float>& aa, const int n) { array_view<float, 2> a_acc(n, n, aa); parallel_for_each(.... the above code works. However, when I replace vector aa with a raw pointer as the following, it crashes float* aaa = new float[nn]; for(int ii = 0; ii < nn; ii++) aaa[ii] = aa[ii]; array_view<float, 2> a_acc(n, n, aaa) Thanks a lot!

  • Anonymous
    September 27, 2012
    Hi Bingcai, Could you be more specific of the "crashes" behavior? I tried a simple example based on the code snippets you provided here, it compiles and runs successfully. If you could share more self-contained repro code, we will be able to help you diagnose better. Thanks, Lingli

  • Anonymous
    September 27, 2012
    BTW, @Bingcai, since your question is not directly related to this post, the best place for AMP questions is our MSDN forum (social.msdn.microsoft.com/.../parallelcppnative). If you don't mind, could you please post your question there?

  • Anonymous
    March 03, 2015
    hello :) can anybody give me some examples(code based) of how to use a multi-gpu platform? I am trying to perform different types of operations (like matrix summation or matrix multiplication) on a multi gpu enviroment in order to see improvement from using more than one gpu. And it's giving me a hard time because the lack of examples, documentation in this particular area of how to use multiple gpus i would be very thankful if you can help me in this area. have a good day!