With the standard syntax for issuing CUDA kernel execution, there seems to be no way to detect failures.
MyKernel<<< ... >>> (...);
This translates to a significant number of cuda runtime API calls, any of which can fail. I’ve looked at the C code generated by [font=“Courier”]nvcc -cuda[/font], and any failures result in the kernel not being executed. But application code is not made aware of the failure.
For serious applications, any errors need to be detected and handled appropriately. How do other people recommend doing this?
The only way I can think of at present is to take the C code generated by nvcc and edit it to handle return codes appropriately. But this options looks messy, time-consuming and error-prone. Is there another way?