Freigeben über


Changes in VS 11 Beta for C++ AMP

With the release of Visual Studio 11 Beta, you get among other things an updated version of C++ AMP.

After the Beta, we aspire to have no breaking changes (or even major additions) in C++ AMP, so that when you receive the final RTM release your upgrade process will be super smooth (the goal is that you’ll just have to recompile). That is part of our team’s promise that we refer to as “go-live” license. The other part of the "go-live"being that we believe our Beta bits are of such great quality that you can indeed use them in a production environment in a supported manner right now! We only have some remainder performance work planned for after the Beta.

The statement of the previous paragraph was not true, of course, for the Developer Preview and there are breaking changes with the Beta (you’ll need to change your code slightly for it to compile with the Beta); there are new additions, and there were many known bugs in the Developer Preview.

In this post I will simply list the changes (in no particular order) to make it easier for you to port your Developer Preview code to the Beta release

  1. restrict(direct3d) is renamed to restrict(amp) . We shared that here.
  2. Replaced grid, tiled_grid with extent and tiled_extent instead. We shared that here.
  3. Added amp_graphics.h with concurrency:graphics namespace with Short Vector Types and Textures. We shared that here.
  4. Changed default queuing _mode not to be immediate, and changed enum names slightly. We shared that here.
  5. Added .wait(…) overloads to tile_barrier for finer grained control. We shared that here.
  6. Replaced <writeonly<…> as option for array_view with .discard_data() . We shared that here.
  7. Moved math functions to amp_math.h in fast_math and precise_math namespaces. We shared that here.
  8. Replaced accelerator_restriction with .supports_double_precision + another property. We shared that here.
  9. Removed all overloads that accepted accelerator instead use .default_view. We shared that here.
  10. Added .set_default() to accelerator and changed how we pick the default. We shared that here.
  11. Replaced global get_all_accelerators function with accelerator::get_all() . We shared that here.
  12. Removed .z, .y, .x and instead use the subscript operator [0], [1], [2]. We shared that here.
  13. Added tiled_extent::pad(). We shared that here.
  14. Added tiled_extent:truncateWe shared that here.
  15. Added accelerator_view_removed exception to help with TDR case. We shared that here.
  16. Added .synchronize_async() to array_view, and made the other _async() methods work. We shared that here.
  17. Added create_marker() to accelerator_view. We shared that here.
  18. Removed .project() on array_view and instead you can still use subscript operator. We shared that here.
  19. Changed the signature for a couple of the atomic operations. We shared that here.
  20. Changed the type of D3D buffer underling C++ AMP arrays (minor impact to interop). We shared that here.
  21. Made triple-digit number of bug fixes including perf improvements. We shared the bits, try re-running your existing code and we love feedback in our MSDN Forum.

If you are moving code from the Developer Preview to the Beta and encounter any additional breaking changes or new features not listed above, then please let us know.

Comments

  • Anonymous
    February 29, 2012
    Just got VS 11 and playing with AMP. So cool. Got 900 single prec. GFLOPS on a GTX 470 (which is close to theoretical max.)  It is just some brain-dead code, but it took no time to create (i.e. I didn't have to create separate .cu files, or compile and launch OpenCL kernels etc.)  I can hardly wait to try the debugger etc. This is going to be a game changer.

  • Anonymous
    March 01, 2012
    Also, concurrency::get_accelerators() is now accelerator::get_all()

  • Anonymous
    March 01, 2012
    eric, very good to hear, thanks for sharing. David, yes that is point #11, thanks for noticing.

  • Anonymous
    March 01, 2012
    Whoops...didn't notice, thanks.

  • Anonymous
    March 01, 2012
    I tried to compile the NBody project in blogs.msdn.com/.../c-amp-sample-projects-for-download.aspx.  VS 11 Beta reports missing d3dx11.h and some other DirectX files.  When wil the projects under the URL be updated?  For now, what should be done to get the project compiled. Thanks.

  • Anonymous
    March 01, 2012
    P.So. All Sample projects are updated by their owner at the blog post where the sample is posted. Please leave your comment under the blog post where you tried to get a sample that is not updated, so its owner can help you and everybody else can benefit from the help on that particular sample project. Many thanks.

  • Anonymous
    March 01, 2012
    Thanks for the advice. I have just done that.

  • Anonymous
    March 04, 2012
    Is there still no GPU debugging on Windows 7 with VS11 beta? If so, will it change in RTM version?

  • Anonymous
    March 05, 2012
    Hi pauljurczak, yes, with Visual Studio 11 Beta you need Windows 8 Consumer Preview in order to debug your restrict(amp) code. We are still working to enable GPU debugging on Windows 7, and I am very confident we will get there. What I still don’t have at this point is a timeframe for when that will happen, sorry.

  • Anonymous
    March 05, 2012
    How about intrinsic compiler support for the float16 "half" type?

  • Anonymous
    March 06, 2012
    Hi asdf, no, that is not in the planned for this release - thanks for the feedback.