If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.
|
|
|
|
#1 |
|
Member
Join Date: Jan 2009
Posts: 229
|
Has anyone experimented with C++ AMP yet?
I downloaded and installed Visual Studio 11 beta, and tried some simple examples. Code is certainly cleaner, simpler than say OpenCL because a lot of the cruft is now implicit though support for some advanced scheduling etc. seems less clear. Performance is decent, requires a lot of manual optimization of kernels but that is no different than OpenCL. While the API is not really introducing any new compute capabilities over say OpenCL, and is limited to VS for the moment, but I do like that MS has put some thought into design and deployment. 1. Code is mostly statically compiled, guaranteed (almost) to work on any DX11 card, with the app vendor not having to worry about whether or not OpenCL driver is working etc. 2. TDRs (timeout detection and recovery) are a big problem for some OpenCL apps, with no good cross-vendor guarantees really. I have had my OpenCL apps crash because the kernel happened to run longer than say 2 seconds, invoking a TDR, and app not being given a chance to respond. Given the huge variety of hardware out there, if I am distributing my app binary, making sure that my kernel does not invoke TDR on any machine at all, is very hard. The only way is to ask end-users to disable TDR by editing registry. In C++ AMP, if a TDR happens, an exception is thrown which your app can catch and respond to. On Windows 8, you will also get the ability to programmatically declare that you want a card all-to-yourself disabling TDRs as long as that is not connected to a display for example. Finer grained context switching is also coming in the future with WDDM 1.2 3. You do get the benefits of integration into VS, which IMO is a great IDE. However, the big downside is of course that it is new, with not much of a library ecosystem and completely dependent on VS and Windows for now. |
|
|
|
| Thread Tools | |
| Display Modes | |
|
|