Wednesday, July 18, 2012 2:04 PM
I'm looking into using AMP with my .NET class library (P/invoke). Am I correct in my assumption that if something should go wrong with a GPU kernel launch, the AMP method will fall back to the CPU? If so, is there a way to restrict the execution of the AMP kernel only to the GPU and, if at runtime it can't, to fall back to the C# code in my class library? Thanks!
Wednesday, July 18, 2012 4:18 PMOwner
The CPU fallback is for Windows 8 only and it is the WARP accelerator:
…do not confuse that with the CPU accelerator which cannot execute code in our v1:
…or with REF which can execute things really slowly:
WARP is an implicit fallback when you don’t specify an accelerator explicitly. You can read more about our current default algorithm here:
So you can either specify an accelerator explicitly or you can check what the default is and decide not to execute the parallel_for_each at all. Both of those approaches would avoid the implicit fallback.